From 5b3ac2be75afca9fc37a7fad8ef3a4cf22892a58 Mon Sep 17 00:00:00 2001 From: maike Date: Mon, 13 Jul 2020 14:04:40 +0200 Subject: [PATCH] [email] Change request methods: REST API does not need to answer GET --- kibicara/platforms/email/webapi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kibicara/platforms/email/webapi.py b/kibicara/platforms/email/webapi.py index e47c566..0ea1a68 100644 --- a/kibicara/platforms/email/webapi.py +++ b/kibicara/platforms/email/webapi.py @@ -109,7 +109,7 @@ async def email_subscribe(subscriber: Subscriber, hood=Depends(get_hood_unauthor raise HTTPException(status_code=status.HTTP_502_BAD_GATEWAY) -@router.get('/subscribe/confirm/{token}', status_code=status.HTTP_201_CREATED) +@router.post('/subscribe/confirm/{token}', status_code=status.HTTP_201_CREATED) async def email_subscribe_confirm(token, hood=Depends(get_hood_unauthorized)): """ Confirm a new subscriber and add them to the database. @@ -124,7 +124,7 @@ async def email_subscribe_confirm(token, hood=Depends(get_hood_unauthorized)): raise HTTPException(status_code=status.HTTP_409_CONFLICT) -@router.get('/unsubscribe/{token}', status_code=status.HTTP_204_NO_CONTENT) +@router.delete('/unsubscribe/{token}', status_code=status.HTTP_204_NO_CONTENT) async def email_unsubscribe(token, hood=Depends(get_hood_unauthorized)): """ Remove a subscriber from the database when they click on an unsubscribe link.