|
@@ -71,7 +71,7 @@ async def logout():
|
|
|
async def add(username: str = Form(default=''), password: str = Form(default=''), email: str = Form(default=''), re_password: str = Form(default='')):
|
|
|
if username and password and email:
|
|
|
if password == re_password:
|
|
|
- hashed_password = bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt())
|
|
|
+ hashed_password = bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt()).decode('utf-8')
|
|
|
u = await User.create(username=username, password=hashed_password, email=email)
|
|
|
if u:
|
|
|
# send_email()
|