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