forked from Fragrance/maquitous
fix: edit info in main.py
This commit is contained in:
parent
cfad9dd749
commit
db007f7d7f
4
main.py
4
main.py
@ -76,7 +76,7 @@ def bad_request(e):
|
||||
|
||||
@app.route("/")
|
||||
def index():
|
||||
return jsonify({"status": "200 OK", "timestamp": int(time.time()), "info": "Project Fragrance","availableApi": ["qr", "ticket", "mapstock", "unlock"], "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"], "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8')}), 200
|
||||
|
||||
@app.route("/qr")
|
||||
def qr_to_userid():
|
||||
@ -255,7 +255,7 @@ def maps():
|
||||
mapId = request.args.get('mapid')
|
||||
userId = request.args.get('userid')
|
||||
if userId is None or userId.isdigit() is False or len(str(userId)) != 8 or mapId is None:
|
||||
return jsonify({"apiName": "map", "apiInfo": "Clear Map", "apiUsage": "/map?userid=<userId>", "availableMaps": available})
|
||||
return jsonify({"apiName": "map", "apiInfo": "Complete Map", "apiUsage": "/map?userid=<userId>&mapid=<mapId>", "availableMaps": available})
|
||||
else:
|
||||
userId = int(userId)
|
||||
mapId = int(mapId)
|
||||
|
Loading…
x
Reference in New Issue
Block a user