restructured

This commit is contained in:
ben
2026-08-17 15:50:41 +02:00
parent bbc8627867
commit 371b6364fe
5 changed files with 370 additions and 390 deletions
+11 -1
View File
@@ -78,4 +78,14 @@ def get_current_user(
algorithms=[ALGORITHM]
)
return payload["user_id"]
return payload["user_id"]
def get_user(user_id):
return fetch_one(
"""
SELECT id, username
FROM users
WHERE id = ?
""",
(user_id,)
)