Skip to content

Commit 798611d

Browse files
committed
Update login.py to receive password as body
546dc8bdcb362e8a0465a82f47753c9d57898882
1 parent d94fdb8 commit 798611d

File tree

1 file changed

+2
-2
lines changed
  • backend/app/app/api/api_v1/endpoints

1 file changed

+2
-2
lines changed

backend/app/app/api/api_v1/endpoints/login.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from datetime import timedelta
22

3-
from fastapi import APIRouter, Depends, HTTPException
3+
from fastapi import APIRouter, Body, Depends, HTTPException
44
from fastapi.security import OAuth2PasswordRequestForm
55
from sqlalchemy.orm import Session
66

@@ -75,7 +75,7 @@ def recover_password(email: str, db: Session = Depends(get_db)):
7575

7676

7777
@router.post("/reset-password/", tags=["login"], response_model=Msg)
78-
def reset_password(token: str, new_password: str, db: Session = Depends(get_db)):
78+
def reset_password(token: str = Body(...), new_password: str = Body(...), db: Session = Depends(get_db)):
7979
"""
8080
Reset password
8181
"""

0 commit comments

Comments
 (0)