瀏覽代碼

登录返回用户名和昵称

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": "",
     })