Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

Lines changed: 1 addition & 1 deletion
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‎

Lines changed: 1 addition & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /