曲が少なすぎる場合は削除できなくする

This commit is contained in:
yuuki
2024-06-01 02:14:08 +00:00
parent fab2c67dae
commit ce6dea3baa
2 changed files with 4 additions and 1 deletions

3
app.py
View File

@@ -834,6 +834,9 @@ def upload_file():
@app.route("/api/delete", methods=["POST"])
def delete():
if client.taiko.songs.count_documents({}) < 50:
return flask.jsonify({ "success": False, "reason": "It feels like there are too few songs already added." })
rand = random.randint(0, 10)
if (rand != 10):
return flask.jsonify({ "success": False, "reason": str(rand) + " IS NOT 10" })