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

Fix resetting password as body, not query #16

Merged
merged 1 commit into from
May 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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