aboutsummaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-03-10 19:13:14 +0100
committerlonkaars <l.leblansch@gmail.com>2021-03-10 19:13:14 +0100
commit0cb860559dce5299272b87e5e03e0a9347df27e6 (patch)
tree550320f4587ee62771009cd911b9c401ac7acfd5 /api
parent9a72d2310682dd0dcb0f9296273fca93591d8a31 (diff)
working global dark mode :tada:
Diffstat (limited to 'api')
-rw-r--r--api/user/preferences.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/user/preferences.py b/api/user/preferences.py
index 4ee48bf..5d46f5f 100644
--- a/api/user/preferences.py
+++ b/api/user/preferences.py
@@ -1,6 +1,7 @@
from flask import Blueprint, request
from db import cursor
from auth.login_token import token_login
+import json
preferences = Blueprint('preferences', __name__)
@@ -16,7 +17,7 @@ def index():
if not login: return "", 403
user_prefs = cursor.execute("select preferences from users where user_id = ?", [login]).fetchone()
- return { "preferences": user_prefs[0] }, 200
+ return { "preferences": json.loads(user_prefs[0]) }, 200
dynamic_route = ["/user", preferences]