Add theme_key to user payload in /me endpoint

The /me endpoint now includes the theme_key in the response payload. This ensures the frontend can access the user's theme preference directly.
This commit is contained in:
2026-02-06 13:31:18 +01:00
parent 745b661709
commit 1473100498

View File

@@ -40,7 +40,7 @@ def me(req: Request, db: Session = Depends(get_db)):
user = db.query(User).filter(User.id == uid).first()
if not user:
raise HTTPException(status_code=401, detail="not logged in")
return {"id": user.id, "email": user.email, "role": user.role, "display_name": user.display_name}
return {"id": user.id, "email": user.email, "role": user.role, "display_name": user.display_name, "theme_key": user.theme_key}
@router.get("/me/stats")