feat: add login test fun in unlock
This commit is contained in:
parent
30a7ab684e
commit
c6c00321b0
15
main.py
15
main.py
@ -202,6 +202,21 @@ def unlock_process():
|
|||||||
return jsonify({"apiName": "unlock", "apiInfo": "Unlock All DX Master Charts.", "apiUsage": "/unlock?userid=<userId>"})
|
return jsonify({"apiName": "unlock", "apiInfo": "Unlock All DX Master Charts.", "apiUsage": "/unlock?userid=<userId>"})
|
||||||
else:
|
else:
|
||||||
userId = int(userId)
|
userId = int(userId)
|
||||||
|
timestamp = int(time.time())
|
||||||
|
login_data = login(userId, timestamp)
|
||||||
|
if login_data['returnCode'] == 102:
|
||||||
|
returnCode = 403
|
||||||
|
status = "403 Forbidden"
|
||||||
|
info = "Unable to operate. Please refresh QrCode."
|
||||||
|
log = {}
|
||||||
|
elif login_data['returnCode'] == 100:
|
||||||
|
returnCode = 403
|
||||||
|
status = "403 Forbidden"
|
||||||
|
info = "Unable to operate. Probably User has logged in."
|
||||||
|
log = {}
|
||||||
|
elif login_data['returnCode'] == 1:
|
||||||
|
userdata_result = userdata(userId)
|
||||||
|
logout(userId, timestamp)
|
||||||
unlock(userId)
|
unlock(userId)
|
||||||
returnCode = 200
|
returnCode = 200
|
||||||
status = "200 OK"
|
status = "200 OK"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user