feat: remove unnecessary info in User response

This commit is contained in:
julius 2025-03-09 16:53:11 +01:00
parent 7bf35b65fb
commit 7580a4f1e6
Signed by: julius
GPG Key ID: C80A63E6A5FD7092

View File

@ -134,7 +134,7 @@ async def get_current_active_user(
):
if current_user.disabled:
raise HTTPException(status_code=400, detail="Inactive user")
return current_user
return current_user.model_dump(exclude={"hashed_password", "disabled"})
async def login_for_access_token(