aboutsummaryrefslogtreecommitdiff
path: root/api/user/status.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/user/status.py')
-rw-r--r--api/user/status.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/api/user/status.py b/api/user/status.py
index 3adb013..e762d12 100644
--- a/api/user/status.py
+++ b/api/user/status.py
@@ -5,17 +5,21 @@ import json
status = Blueprint('user_status', __name__)
-@status.route('/status', methods = ['POST'])
+
+@status.route('/status', methods=['POST'])
@auth_required("user")
def index(user_id):
- data = request.get_json()
- status = data.get("status") or ""
- if not status: return "", 400
+ data = request.get_json()
+ status = data.get("status") or ""
+ if not status: return "", 400
- cursor.execute("update users set status = ? where user_id = ?", [status[0:200], user_id])
- connection.commit()
+ cursor.execute(
+ "update users set status = ? where user_id = ?",
+ [status[0:200], user_id]
+ )
+ connection.commit()
- return "", 200
+ return "", 200
-dynamic_route = ["/user", status]
+dynamic_route = ["/user", status]