fix: edit info in main.py

This commit is contained in:
7a1dd609-d238-4580-9d5f-ee8412b0f5bc 2025-01-15 23:24:20 +08:00
parent cfad9dd749
commit db007f7d7f

View File

@ -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)