unlock > unlock_all

This commit is contained in:
armv7a 2025-04-17 09:00:41 +08:00
parent 5ecb34920a
commit 01c270caa7
2 changed files with 5 additions and 5 deletions

View File

@ -58,7 +58,7 @@ You send your information to __Maquitous__, __Maquitous__ transfer your informat
"userId": integer
}
- `GET /unlock?userid=userId` - Unlock all DX Master Charts in account.
- `GET /unlock_all?userid=userId` - Unlock all DX Master Charts in account.
Params: `userId`
Response:

View File

@ -38,7 +38,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", "map", "bonus"], "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_all", "map", "bonus"], "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():
@ -156,11 +156,11 @@ def mapstock_process():
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
@app.route("/unlock")
@app.route("/unlock_all")
def unlock_process():
userId = request.args.get('userid')
if userId is None or userId.isdigit() is False or len(str(userId)) != 8:
return jsonify({"apiName": "unlock", "apiInfo": "Unlock All DX Master Charts.", "apiUsage": "/unlock?userid=<userId>"})
return jsonify({"apiName": "unlock", "apiInfo": "Unlock All DX Master Charts.", "apiUsage": "/unlock_all?userid=<userId>"})
else:
userId = int(userId)
timestamp = int(time.time())
@ -183,7 +183,7 @@ def unlock_process():
status = "200 OK"
info = "Succeed."
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": "unlock_all", "date": datetime.now(pytz.timezone('Asia/Shanghai')).strftime('%a, %d %b %Y %H:%M:%S GMT+8'), "userId": userId})
return data, returnCode
@app.route("/music", methods=['POST'])