restructured

This commit is contained in:
ben committed 2026-08-17 15:50:41 +02:00
1 parent bbc8627867
commit 371b6364fe
5 files changed
+370 -390

No files matched your search

+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,)
)