Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

Commit 2ea88ff

Browse files
authored
🔒 Fix resetting password as body, not query (#16)
1 parent 47d90f3 commit 2ea88ff

File tree

1 file changed

+2
-2
lines changed
  • {{cookiecutter.project_slug}}/backend/app/app/api/api_v1/endpoints

1 file changed

+2
-2
lines changed

{{cookiecutter.project_slug}}/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

66
from app import crud
@@ -71,7 +71,7 @@ def recover_password(username: str):
7171

7272

7373
@router.post("/reset-password/", response_model=Msg)
74-
def reset_password(token: str, new_password: str):
74+
def reset_password(token: str = Body(...), new_password: str = Body(...)):
7575
"""
7676
Reset password.
7777
"""

0 commit comments

Comments
 (0)