restructured
This commit is contained in:
+11
-1
@@ -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,)
|
||||
)
|
||||
Reference in New Issue
Block a user