Исправление бага: token_check -> False/True вместо ответа SystemAPI
This commit is contained in:
parent
849ad4b2d4
commit
11ab54ad46
@ -29,7 +29,11 @@ SYSTEM_API_TOKEN = CONFIG['system_api_token']
|
|||||||
# APIs (main code)
|
# APIs (main code)
|
||||||
#------------------------------------------------------------
|
#------------------------------------------------------------
|
||||||
async def token_check(username, user_token):
|
async def token_check(username, user_token):
|
||||||
return await check_user_token(SYSTEM_API_TOKEN, username, user_token)
|
result = await check_user_token(SYSTEM_API_TOKEN, username, user_token)
|
||||||
|
if result == 'OK':
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
@app.post('/api/register_user_token/')
|
@app.post('/api/register_user_token/')
|
||||||
async def register_user_token_api(
|
async def register_user_token_api(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user