From 89009d44c6db1fcacdb9103096e6dc297a5e9376 Mon Sep 17 00:00:00 2001 From: Luna Date: Sun, 17 Mar 2019 02:00:51 -0300 Subject: [PATCH] webhooks: fix unused/undefined vars --- litecord/blueprints/webhooks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litecord/blueprints/webhooks.py b/litecord/blueprints/webhooks.py index 85e81e3..eb84396 100644 --- a/litecord/blueprints/webhooks.py +++ b/litecord/blueprints/webhooks.py @@ -52,7 +52,7 @@ async def get_webhook(webhook_id: int) -> Optional[Dict[str, Any]]: return drow -async def _webhook_check(): +async def _webhook_check(channel_id): user_id = await token_check() await channel_check(user_id, channel_id, ChannelType.GUILD_TEXT) @@ -64,7 +64,7 @@ async def _webhook_check(): @bp.route('/channels//webhooks', methods=['POST']) async def create_webhook(channel_id: int): """Create a webhook given a channel.""" - user_id = await _webhook_check() + user_id = await _webhook_check(channel_id) j = validate(await request.get_json(), WEBHOOK_CREATE) @@ -90,7 +90,7 @@ async def create_webhook(channel_id: int): @bp.route('/channels//webhooks', methods=['GET']) async def get_channel_webhook(channel_id: int): """Get a list of webhooks in a channel""" - _user_id = await _webhook_check() + await _webhook_check(channel_id) webhook_ids = await app.db.fetch(""" SELECT id