add endpoint /login
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
from src.api.dependacies.db_dep import sessionDep
|
||||
from src.schemas.users import UserRequest
|
||||
from src.schemas.users import UserRequestADD, UserRequest
|
||||
from src.core.settings import settings
|
||||
from src.services.auth import AuthService
|
||||
|
||||
@@ -9,6 +9,12 @@ router = APIRouter(prefix=settings.api.v1.auth, tags=["Auth"])
|
||||
|
||||
|
||||
@router.post(path="/signup")
|
||||
async def registration(session: sessionDep, credential: UserRequest):
|
||||
async def registration(session: sessionDep, credential: UserRequestADD):
|
||||
auth = await AuthService(session).registration(credential)
|
||||
return auth
|
||||
|
||||
|
||||
@router.post(path="/login")
|
||||
async def login(session: sessionDep, credential: UserRequest):
|
||||
|
||||
...
|
||||
|
||||
Reference in New Issue
Block a user