diff --git a/kibicara/platforms/email/webapi.py b/kibicara/platforms/email/webapi.py index 9a4efc4..3c45f9e 100644 --- a/kibicara/platforms/email/webapi.py +++ b/kibicara/platforms/email/webapi.py @@ -171,6 +171,7 @@ async def email_delete(email=Depends(get_email)): :param hood: Hood the Email bot belongs to. """ await email.delete() + return Response(status_code=status.HTTP_204_NO_CONTENT) @router.post( @@ -257,6 +258,7 @@ async def email_unsubscribe(token, hood=Depends(get_hood_unauthorized)): hood=payload['hood'], email=payload['email'] ).get() await subscriber.delete() + return Response(status_code=status.HTTP_204_NO_CONTENT) except NoMatch: return HTTPException(status_code=status.HTTP_404_NOT_FOUND) except exceptions.CryptoError: diff --git a/kibicara/platforms/telegram/webapi.py b/kibicara/platforms/telegram/webapi.py index 07e8c0d..00fc0f7 100644 --- a/kibicara/platforms/telegram/webapi.py +++ b/kibicara/platforms/telegram/webapi.py @@ -87,6 +87,7 @@ async def telegram_delete(telegram=Depends(get_telegram)): for user in await TelegramUser.objects.filter(bot=telegram).all(): await user.delete() await telegram.delete() + return Response(status_code=status.HTTP_204_NO_CONTENT) @router.post( diff --git a/kibicara/platforms/twitter/webapi.py b/kibicara/platforms/twitter/webapi.py index e08caa2..14909dc 100644 --- a/kibicara/platforms/twitter/webapi.py +++ b/kibicara/platforms/twitter/webapi.py @@ -74,6 +74,7 @@ async def twitter_read(twitter=Depends(get_twitter)): async def twitter_delete(twitter=Depends(get_twitter)): spawner.stop(twitter) await twitter.delete() + return Response(status_code=status.HTTP_204_NO_CONTENT) @router.get( diff --git a/kibicara/webapi/hoods/__init__.py b/kibicara/webapi/hoods/__init__.py index 95bed10..98c2623 100644 --- a/kibicara/webapi/hoods/__init__.py +++ b/kibicara/webapi/hoods/__init__.py @@ -106,6 +106,7 @@ async def hood_update(values: BodyHood, hood=Depends(get_hood)): - **landingpage**: New Markdown formatted description of the hood """ await hood.update(**values.__dict__) + return Response(status_code=status.HTTP_204_NO_CONTENT) @router.delete( @@ -124,3 +125,4 @@ async def hood_delete(hood=Depends(get_hood)): for relation in await AdminHoodRelation.objects.filter(hood=hood).all(): await relation.delete() await hood.delete() + return Response(status_code=status.HTTP_204_NO_CONTENT) diff --git a/kibicara/webapi/hoods/badwords.py b/kibicara/webapi/hoods/badwords.py index 197abe0..cf6b50b 100644 --- a/kibicara/webapi/hoods/badwords.py +++ b/kibicara/webapi/hoods/badwords.py @@ -88,6 +88,7 @@ async def badword_update(values: BodyBadWord, badword=Depends(get_badword)): - **pattern**: Regular expression which is used to match a badword """ await badword.update(**values.__dict__) + return Response(status_code=status.HTTP_204_NO_CONTENT) @router.delete( @@ -98,3 +99,4 @@ async def badword_update(values: BodyBadWord, badword=Depends(get_badword)): async def badword_delete(badword=Depends(get_badword)): """ Deletes badword with id **badword_id** for hood with id **hood_id**. """ await badword.delete() + return Response(status_code=status.HTTP_204_NO_CONTENT) diff --git a/kibicara/webapi/hoods/triggers.py b/kibicara/webapi/hoods/triggers.py index 4ae0c28..02653e9 100644 --- a/kibicara/webapi/hoods/triggers.py +++ b/kibicara/webapi/hoods/triggers.py @@ -89,6 +89,7 @@ async def trigger_update(values: BodyTrigger, trigger=Depends(get_trigger)): - **pattern**: Regular expression which is used to match a trigger """ await trigger.update(**values.__dict__) + return Response(status_code=status.HTTP_204_NO_CONTENT) @router.delete( @@ -99,3 +100,4 @@ async def trigger_update(values: BodyTrigger, trigger=Depends(get_trigger)): async def trigger_delete(trigger=Depends(get_trigger)): """ Deletes trigger with id **trigger_id** for hood with id **hood_id**. """ await trigger.delete() + return Response(status_code=status.HTTP_204_NO_CONTENT)