diff --git a/{{cookiecutter.project_slug}}/backend/app/app/api/api_v1/endpoints/login.py b/{{cookiecutter.project_slug}}/backend/app/app/api/api_v1/endpoints/login.py index 2640f1c77e..64197ca10f 100644 --- a/{{cookiecutter.project_slug}}/backend/app/app/api/api_v1/endpoints/login.py +++ b/{{cookiecutter.project_slug}}/backend/app/app/api/api_v1/endpoints/login.py @@ -1,6 +1,6 @@ from datetime import timedelta -from fastapi import APIRouter, Depends, HTTPException +from fastapi import APIRouter, Body, Depends, HTTPException from fastapi.security import OAuth2PasswordRequestForm from sqlalchemy.orm import Session @@ -74,7 +74,7 @@ def recover_password(email: str, db: Session = Depends(get_db)): @router.post("/reset-password/", tags=["login"], response_model=Msg) -def reset_password(token: str, new_password: str, db: Session = Depends(get_db)): +def reset_password(token: str, new_password: str = Body(...), db: Session = Depends(get_db)): """ Reset password """