Преглед изворни кода

登录返回用户名和昵称

zhangqian пре 1 година
родитељ
комит
e12e689321
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      app/api/auth.py

+ 3 - 1
app/api/auth.py

@@ -80,5 +80,7 @@ async def login(login_data: LoginData, db: Session = Depends(get_db)):
 
     return Response(code=200, msg="Login successful", data={
         "access_token": access_token,
-        "token_type": "bearer"
+        "token_type": "bearer",
+        "username": user.username,
+        "nickname": "",
     })