Возвращаем просто токен, а не джисонку

This commit is contained in:
DmitryGantimurov 2023-07-16 23:25:22 +03:00
parent 349d40daa4
commit b360b06d34

View File

@ -165,7 +165,7 @@ async def login_for_access_token(
access_token = create_access_token( access_token = create_access_token(
data={"user_id": user.id}, expires_delta=access_token_expires data={"user_id": user.id}, expires_delta=access_token_expires
) )
return {"access_token": access_token} return access_token
@app.get("/api/users/me/", response_model=User) @app.get("/api/users/me/", response_model=User)