From c8d46767640d0d0c8fd561586fa34a7aa2ac49c5 Mon Sep 17 00:00:00 2001 From: Ashibaya Date: Mon, 26 Jul 2021 17:07:06 +0900 Subject: [PATCH] Login change return dictionary. Added user login, name, surname. --- auth/routers/authentication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/routers/authentication.py b/auth/routers/authentication.py index 5838b95..edc0059 100644 --- a/auth/routers/authentication.py +++ b/auth/routers/authentication.py @@ -21,4 +21,4 @@ def login(request: OAuth2PasswordRequestForm = Depends(), db: Session = Depends( detail=f"Incorrect password") access_token = token.create_access_token(data={"sub": user.email}) - return {"access_token": access_token, "token_type": "bearer"} + return {"access_token": access_token, "token_type": "bearer", "login": user.login,"name": user.name, "surname": user.surname}