forked from Fragrance/maquitous
fix: dict should not be a key.
This commit is contained in:
parent
4f9c415da0
commit
f015ff7cc9
4
host.py
4
host.py
@ -30,7 +30,7 @@ def method_not_allowed(e):
|
||||
return jsonify({"status": "405 Method Not Allowed", "timestamp": int(time.time()), "info": "You are using the wrong method. Check the docs.", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8')}), 405
|
||||
|
||||
@app.errorhandler(400)
|
||||
def method_not_allowed(e):
|
||||
def bad_request(e):
|
||||
return jsonify({"status": "400 Bad Request", "timestamp": int(time.time()), "info": "Something went Wrong.", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8')}), 400
|
||||
|
||||
|
||||
@ -206,7 +206,7 @@ def music_post():
|
||||
music(userId, music_data)
|
||||
returnCode = 200
|
||||
status = "200 OK"
|
||||
info = "Operation was Su."
|
||||
info = "Succeed."
|
||||
log = {"UserLoginApiStatus": 1, "UploadUserPlaylogApiStatus": 1, "UpsertUserAllApi": 1,"UserLogoutApiStatus": 1}
|
||||
else:
|
||||
returnCode = 500
|
||||
|
10
mapstock.py
10
mapstock.py
@ -374,11 +374,11 @@ def music(userId):
|
||||
|
||||
userall_result = json.loads(sdgb_api(data, "UpsertUserAllApi", userId))
|
||||
|
||||
data = json.dumps(
|
||||
login_result,
|
||||
userlog_result,
|
||||
userall_result
|
||||
)
|
||||
data = json.dumps({
|
||||
"UserLogin": login_result,
|
||||
"UserPlaylog": userlog_result,
|
||||
"UpsertUserall": userall_result
|
||||
})
|
||||
|
||||
return data
|
||||
|
||||
|
10
music.py
10
music.py
@ -638,11 +638,11 @@ def music(userId, music_data):
|
||||
|
||||
userall_result = json.loads(sdgb_api(data, "UpsertUserAllApi", userId))
|
||||
|
||||
data = json.dumps(
|
||||
login_result,
|
||||
userlog_result
|
||||
userall_result
|
||||
)
|
||||
data = json.dumps({
|
||||
"UserLogin": login_result,
|
||||
"UserPlaylog": userlog_result,
|
||||
"UpsertUserall": userall_result
|
||||
})
|
||||
|
||||
return data
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user