From 34bd1a6a64345604d6a374c08fb20e5d90e23a92 Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Thu, 17 Apr 2025 19:59:14 +0000 Subject: [PATCH] feat: Updated endpoint endpoints/login.post.py via AI --- endpoints/login.post.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/endpoints/login.post.py b/endpoints/login.post.py index 14a3261..02733c9 100644 --- a/endpoints/login.post.py +++ b/endpoints/login.post.py @@ -1,13 +1,13 @@ -from fastapi import APIRouter, status, HTTPException +from fastapi import APIRouter, HTTPException, status from schemas.user import UserLogin -from helpers.auth_helpers import login_user +from helpers.auth_helpers import authenticate_user router = APIRouter() -@router.post("/login", status_code=status.HTTP_200_OK, response_model=UserLogin) +@router.post("/login", status_code=status.HTTP_200_OK) async def login(user_data: UserLogin): - """Authenticate user and retrieve login data""" - user = login_user(user_data=user_data) + """Authenticate user""" + user = authenticate_user(user_data) if not user: raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Invalid credentials") return user \ No newline at end of file