8000 updated · wpcodevo/python_fastapi@137dca0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 137dca0

Browse files
committed
updated
1 parent 0a07b44 commit 137dca0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/routers/auth.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def create_user(payload: schemas.CreateUserSchema, db: Session = Depends(g
4848
raise HTTPException(
4949
status_code=status.HTTP_400_BAD_REQUEST, detail='Passwords do not match')
5050
# Hash the password
51-
payload.password = utils.hash(payload.password)
51+
payload.password = utils.hash_password(payload.password)
5252
del payload.passwordConfirm
5353
payload.role = 'user'
5454
payload.verified = True

app/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
44

55

6-
def hash(password: str):
6+
def hash_password(password: str):
77
return pwd_context.hash(password)
88

99

0 commit comments

Comments
 (0)
0