Skip to content

Commit

Permalink
Comentários de authController
Browse files Browse the repository at this point in the history
  • Loading branch information
RaissaAndradeS committed Dec 10, 2023
1 parent c72d83a commit 7ff89b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/controller/authController.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ async def register(data: authSchema.UserCreate, db: Session = Depends(get_db)):

return JSONResponse(status_code=201, content={ "status": "success" })

# Recebe os dados de login
@auth.post("/login", response_model=authSchema.Token)
async def login(data: authSchema.UserLogin, db: Session = Depends(get_db)):
user = userRepository.get_user_by_email(db, data.email)
Expand Down Expand Up @@ -144,6 +145,7 @@ async def verify_reset_code(data: authSchema.ResetPasswordVerify, db: Session =

return JSONResponse(status_code=200, content={ "status": "success" })

# Atualizar senha de um usuário após uma solicitação de redefinição
@auth.patch('/reset-password/change', response_model=userSchema.User)
async def update_user_password(data: authSchema.ResetPasswordUpdate, db: Session = Depends(get_db)):
user = userRepository.get_user_by_email(db, data.email)
Expand Down

0 comments on commit 7ff89b6

Please sign in to comment.