aboutsummaryrefslogtreecommitdiff
path: root/api/user/status.py
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-11 17:50:58 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-11 17:50:58 +0200
commit28f104de9ae9abe4b42abafbf3865ede5687996c (patch)
tree65e651f09d8fbf81380384692e45803cb4f9d61c /api/user/status.py
parent7b4859059b3bbabf4139ccdf3270a82c094f5d8e (diff)
dprint yapf python formatting
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]