This commit is contained in:
암냥 2025-09-13 16:24:39 +09:00
commit 5f8600d9ae
3 changed files with 14 additions and 15 deletions

View file

@ -48,21 +48,20 @@ async def login_user(login_data: UserLogin) -> dict:
if not user:
raise HTTPException(
status_code=
detail=
status_code=status.HTTP_401_UNAUTHORIZED,
detail="User account is not exist"
)
if not user.is_active:
raise HTTPException(
status_code=, detail=""
status_code=status.HTTP_401_UNAUTHORIZED, detail="User account is incative"
)
access_token =
access_token = create_access_token(data={"sub": user.username})
return {"access_token": access_token, "token_type": "bearer"}
@router.get("/profile/{username}", response_model=UserResponse)
async def get_user_profile(username: str) -> UserResponse:
user = await user_service.get_user_by_username(username)