remove log.
This commit is contained in:
parent
637457dd37
commit
bfa29f669f
@ -39,7 +39,6 @@ You send your information to __Maquitous__, __Maquitous__ transfer your informat
|
||||
"status": string,
|
||||
"timestamp": integer,
|
||||
"info": string,
|
||||
"log": [],
|
||||
"apiName": "ticket",
|
||||
"date": string,
|
||||
"userId": integer
|
||||
@ -54,7 +53,6 @@ You send your information to __Maquitous__, __Maquitous__ transfer your informat
|
||||
"status": string,
|
||||
"timestamp": integer,
|
||||
"info": string,
|
||||
"log": [],
|
||||
"apiName": "mapstock",
|
||||
"date": string,
|
||||
"userId": integer
|
||||
@ -69,7 +67,6 @@ You send your information to __Maquitous__, __Maquitous__ transfer your informat
|
||||
"status": string,
|
||||
"timestamp": integer,
|
||||
"info": string,
|
||||
"log": [],
|
||||
"apiName": "unlock",
|
||||
"date": string,
|
||||
"userId": integer
|
||||
@ -99,7 +96,6 @@ You send your information to __Maquitous__, __Maquitous__ transfer your informat
|
||||
"status": string,
|
||||
"timestamp": integer,
|
||||
"info": string,
|
||||
"log": [],
|
||||
"apiName": "music",
|
||||
"date": string,
|
||||
"userId": integer
|
||||
|
16
host.py
16
host.py
@ -53,7 +53,7 @@ def qr_to_userid():
|
||||
elif len(str(qr_result['userID'])) == 8:
|
||||
returnCode = 200
|
||||
status = "200 OK"
|
||||
info = "Operation was Successful."
|
||||
info = "Succeed."
|
||||
userId = qr_result['userID']
|
||||
else:
|
||||
returnCode = 500
|
||||
@ -96,7 +96,7 @@ def ticket():
|
||||
logout(userId, timestamp)
|
||||
returnCode = 200
|
||||
status = "200 OK"
|
||||
info = "Operation was Successful."
|
||||
info = "Succeed."
|
||||
log = {"UserLoginApiStatus": 1, "UpsertUserChargelogStatus": 1, "UserLogoutApiStatus": 1}
|
||||
else:
|
||||
returnCode = 500
|
||||
@ -113,7 +113,7 @@ def ticket():
|
||||
status = "500 Internal Server Error"
|
||||
info = "Unknown Error. Failed in GetUserCharge"
|
||||
log = charge_data
|
||||
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "log": log, "apiName": "ticket", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
||||
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "apiName": "ticket", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
||||
return data, returnCode
|
||||
|
||||
@app.route("/mapstock")
|
||||
@ -151,7 +151,7 @@ def mapstock():
|
||||
if userdata_result['userData']['mapStock'] == 99000:
|
||||
returnCode = 200
|
||||
status = "200 OK"
|
||||
info = "Operation was Successful."
|
||||
info = "Succeed."
|
||||
log = {"UserLoginApiStatus": 1, "UploadUserPlaylogApiStatus": 1, "UpsertUserAllApi": 1, "UserLogoutApiStatus": 1}
|
||||
break
|
||||
else:
|
||||
@ -162,7 +162,7 @@ def mapstock():
|
||||
status = "500 Internal Server Error"
|
||||
info = "Unknown Error. Failed in UserLogin"
|
||||
log = login_data
|
||||
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "log": log, "apiName": "mapstock", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
||||
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "apiName": "mapstock", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
||||
return data, returnCode
|
||||
|
||||
@app.route("/unlock")
|
||||
@ -175,9 +175,9 @@ def unlock():
|
||||
unlock(userId)
|
||||
returnCode = 200
|
||||
status = "200 OK"
|
||||
info = "Operation was Successful."
|
||||
info = "Succeed."
|
||||
log = {"UserLoginApiStatus": 1, "UploadUserPlaylogApiStatus": 1, "UpsertUserAllApi": 1, "UserLogoutApiStatus": 1}
|
||||
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "log": log, "apiName": "unlock", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
||||
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "apiName": "unlock", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
||||
return data
|
||||
|
||||
@app.route("/music", methods=['POST'])
|
||||
@ -215,7 +215,7 @@ def music_post():
|
||||
log = login_data
|
||||
else:
|
||||
return jsonify({"apiName": "music", "apiInfo": "Overwrite Music Data in UserData.", "apiUsage": ""})
|
||||
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "log": log, "apiName": "music", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
||||
data = jsonify({"status": status, "timestamp": timestamp, "info": info, "apiName": "music", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
|
||||
return data, returnCode
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
x
Reference in New Issue
Block a user