From c5781200c70d43e72c5c448a80a106231d189a4f Mon Sep 17 00:00:00 2001 From: Cathy Hu Date: Mon, 6 Jul 2020 15:01:28 +0200 Subject: [PATCH] [twitter] Delete twitter bot entry on oauth error --- kibicara/platforms/twitter/webapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kibicara/platforms/twitter/webapi.py b/kibicara/platforms/twitter/webapi.py index c73ee1b..4ca50ed 100644 --- a/kibicara/platforms/twitter/webapi.py +++ b/kibicara/platforms/twitter/webapi.py @@ -53,7 +53,7 @@ async def twitter_create(response: Response, hood=Depends(get_hood)): callback_uri='http://127.0.0.1:8000/api/twitter/callback', ) if oauth_token['oauth_callback_confirmed'] != 'true': - # TODO delete twitter + await twitter.delete() raise HTTPException(status_code=status.HTTP_503_SERVICE_UNAVAILABLE) await twitter.update( access_token=oauth_token['oauth_token'],