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

Commit

Permalink
🔒 Fix resetting password as body, not query (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo authored May 29, 2019
1 parent 47d90f3 commit 2ea88ff
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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 app import crud
Expand Down Expand Up @@ -71,7 +71,7 @@ def recover_password(username: str):


@router.post("/reset-password/", response_model=Msg)
def reset_password(token: str, new_password: str):
def reset_password(token: str = Body(...), new_password: str = Body(...)):
"""
Reset password.
"""
Expand Down

0 comments on commit 2ea88ff

Please sign in to comment.