From 2ea88ff57083cce9ced5438c96252ed2b90be92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Wed, 29 May 2019 09:38:33 +0400 Subject: [PATCH] :lock: Fix resetting password as body, not query (#16) --- .../backend/app/app/api/api_v1/endpoints/login.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 7d6e060..d028f55 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 app import crud @@ -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. """