aboutsummaryrefslogtreecommitdiffstats
path: root/pysite
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-02-14 10:04:47 +0000
committerGravatar Gareth Coles <[email protected]>2018-02-14 10:04:47 +0000
commit21a94ee7e0d9aa022e8812889c0f4ce6eab7c5c9 (patch)
tree5401ef716a4a43d1410250c85f4af522e1e5fdb8 /pysite
parentSnekchek (diff)
[API] You need to return the value of `self.error()`
Diffstat (limited to 'pysite')
-rw-r--r--pysite/views/api/bot/tag.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pysite/views/api/bot/tag.py b/pysite/views/api/bot/tag.py
index acbdbc0c..e679b500 100644
--- a/pysite/views/api/bot/tag.py
+++ b/pysite/views/api/bot/tag.py
@@ -38,7 +38,7 @@ class TagView(APIView):
data = rdb.pluck('tag_name').run(g.db.conn)
data = list(data) if data else []
else:
- self.error(ErrorCodes.invalid_api_key)
+ return self.error(ErrorCodes.invalid_api_key)
return jsonify(data)
@@ -59,8 +59,8 @@ class TagView(APIView):
'tag_category': tag_category
}).run(g.db.conn)
else:
- self.error(ErrorCodes.missing_parameters)
+ return self.error(ErrorCodes.missing_parameters)
else:
- self.error(ErrorCodes.invalid_api_key)
+ return self.error(ErrorCodes.invalid_api_key)
return jsonify({'success': True})