Add display_name support for users in backend and frontend
This commit introduces the `display_name` field to the user model. It updates database migrations, API endpoints, and the admin panel to handle this field. Additionally, the `display_name` is now shown in the TopBar and WinnerBadge components, improving user experience.
This commit is contained in:
@@ -40,7 +40,8 @@ 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, "theme_key": user.theme_key}
|
||||
return {"id": user.id, "email": user.email, "role": user.role, "display_name": user.display_name}
|
||||
|
||||
|
||||
|
||||
@router.patch("/password")
|
||||
|
||||
Reference in New Issue
Block a user