From c6ff1071b85408311488a726cdb2d04c6f22ac6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?JeffMint=F0=9F=9A=80?= <122024815+Minty-cyber@users.noreply.github.com> Date: Mon, 4 Nov 2024 14:49:14 +0000 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8FRefactor=20for=20clean=20impo?= =?UTF-8?q?rt=20statements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/api/routes/login.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/app/api/routes/login.py b/backend/app/api/routes/login.py index fe7e94d5c1..d9e99065cc 100644 --- a/backend/app/api/routes/login.py +++ b/backend/app/api/routes/login.py @@ -9,7 +9,6 @@ from app.api.deps import CurrentUser, SessionDep, get_current_active_superuser from app.core import security from app.core.config import settings -from app.core.security import get_password_hash from app.models import Message, NewPassword, Token, UserPublic from app.utils import ( generate_password_reset_token, @@ -91,7 +90,7 @@ def reset_password(session: SessionDep, body: NewPassword) -> Message: ) elif not user.is_active: raise HTTPException(status_code=400, detail="Inactive user") - hashed_password = get_password_hash(password=body.new_password) + hashed_password = security.get_password_hash(password=body.new_password) user.hashed_password = hashed_password session.add(user) session.commit()