ready login endpoint

This commit is contained in:
IluaAir
2025-07-14 12:41:03 +03:00
parent 19a9b36173
commit d530412805
5 changed files with 44 additions and 10 deletions

View File

@@ -19,7 +19,10 @@ async def registration(session: sessionDep, credential: UserRequestADD):
@router.post(path="/login")
async def login(
session: sessionDep,
credential: Annotated[OAuth2PasswordRequestForm, Depends()],
):
user = AuthService(session).login(credential.username, credential.password)
session: sessionDep,
credential: Annotated[OAuth2PasswordRequestForm, Depends()],
):
access_token = await AuthService(session).login(
credential.username, credential.password
)
return access_token