|
@@ -118,6 +118,7 @@ async def login(username: str = Form(default=''), password: str = Form(default='
|
|
|
return_msg = {
|
|
|
"access_token": access_token,
|
|
|
"token_type": "bearer",
|
|
|
+ "domain":"ntcri.org",
|
|
|
}
|
|
|
return return_msg
|
|
|
# if add_time_code:
|
|
@@ -153,7 +154,7 @@ async def add(username: str = Form(default=''), password: str = Form(default='')
|
|
|
else:
|
|
|
if password == re_password:
|
|
|
hashed_password = bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt()).decode('utf-8')
|
|
|
- u = await User.create(username=username, password=hashed_password, email=email,is_superuser=0,is_gmail=0,token='')
|
|
|
+ u = await User.create(username=username, password=hashed_password, email=email,is_superuser=0,is_gmail=0,token='',points=0)
|
|
|
if u:
|
|
|
message = '註冊成功'
|
|
|
subject = '註冊信'
|