Large refactoring for better JSONL context. Switched back the urlsafe for session tokens that need to be passed in URLs. Other minor fixes.

This commit is contained in:
2026-01-24 00:40:32 +00:00
parent 57a9c60557
commit cebef8adfc
10 changed files with 262 additions and 163 deletions
+2 -2
View File
@@ -288,11 +288,11 @@ async def api_logout(request: Request, response: Response, auth=AUTH_COOKIE):
if not auth:
return {"message": "Already logged out"}
try:
s = await get_session(auth, host=request.headers.get("host"))
_s = await get_session(auth, host=request.headers.get("host"))
except ValueError:
return {"message": "Already logged out"}
with suppress(Exception):
db.delete_session(auth, actor=str(s.user_uuid))
db.delete_session(auth)
session.clear_session_cookie(response)
return {"message": "Logged out successfully"}