削除しづらくする

This commit is contained in:
yuuki
2024-12-05 19:22:41 +09:00
parent 45cc38a4d2
commit 28ec3686d6
2 changed files with 4 additions and 4 deletions

6
app.py
View File

@@ -828,9 +828,9 @@ def upload_file():
@app.route("/api/delete", methods=["POST"])
def delete():
rand = random.randint(0, 10)
if (rand != 10):
return flask.jsonify({ "success": False, "reason": str(rand) + " IS NOT 10" })
rand = random.randint(0, 1000)
if (rand != 1000):
return flask.jsonify({ "success": False, "reason": str(rand) + " IS NOT 1000" })
id = flask.request.get_json().get('id')
client["taiko"]["songs"].delete_one({ "id": id })