forked from Fragrance/maquitous
fix: worng in tickrt return
This commit is contained in:
8
main.py
8
main.py
@@ -38,7 +38,7 @@ def bad_request(e):
|
|||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
def index():
|
def index():
|
||||||
return jsonify({"status": "200 OK", "timestamp": int(time.time()), "info": "Project Fragrance","availableApi": ["qr", "ticket", "mapstock", "unlock", "map"], "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8')}), 200
|
return jsonify({"status": "200 OK", "timestamp": int(time.time()), "info": "Project Fragrance","availableApi": ["qr", "ticket", "mapstock", "unlock", "map", "bonus"], "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8')}), 200
|
||||||
|
|
||||||
@app.route("/qr")
|
@app.route("/qr")
|
||||||
def qr_to_userid():
|
def qr_to_userid():
|
||||||
@@ -94,8 +94,8 @@ def ticket():
|
|||||||
ticket_data = get_ticket(userId)
|
ticket_data = get_ticket(userId)
|
||||||
if ticket_data['returnCode'] == 0:
|
if ticket_data['returnCode'] == 0:
|
||||||
logout(userId, timestamp)
|
logout(userId, timestamp)
|
||||||
returnCode = 405
|
returnCode = 403
|
||||||
status = "405 Method Not Allowed"
|
status = "403 Forbidden"
|
||||||
info = "WARNING: THIS INFO SHOULD NEVER APPEARS. IF YOU SEE THIS WARNING PLEASE CONTACT Telegram@sasakure. Unable to operate. Successfully Logged in. Probably User has had one ticket."
|
info = "WARNING: THIS INFO SHOULD NEVER APPEARS. IF YOU SEE THIS WARNING PLEASE CONTACT Telegram@sasakure. Unable to operate. Successfully Logged in. Probably User has had one ticket."
|
||||||
log = {"UserLoginApiStatus": 1, "UserLogoutApiStatus": 1}
|
log = {"UserLoginApiStatus": 1, "UserLogoutApiStatus": 1}
|
||||||
elif ticket_data['returnCode'] == 1:
|
elif ticket_data['returnCode'] == 1:
|
||||||
@@ -296,7 +296,7 @@ def bonus():
|
|||||||
status = "200 OK"
|
status = "200 OK"
|
||||||
info = "Succeed."
|
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, "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": "bonus", "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__':
|
||||||
|
|||||||
Reference in New Issue
Block a user