maint script
This commit is contained in:
@@ -28,6 +28,7 @@ from utils import (
|
||||
db_add_download,
|
||||
db_get_file,
|
||||
db_delete_file,
|
||||
db_maintenance,
|
||||
)
|
||||
|
||||
__MINI_FLEES_VERSION__ = "20230818.0"
|
||||
@@ -109,6 +110,12 @@ def ls():
|
||||
return "\n".join(file_list()), 200
|
||||
|
||||
|
||||
@app.route("/maintenance", methods=["GET"])
|
||||
def maintenance():
|
||||
secret = request.headers.get("Secret", "")
|
||||
if secret != app.config["ACCESS_TOKEN"]:
|
||||
return "Error", 401
|
||||
return db_maintenance(), 200
|
||||
|
||||
|
||||
@app.route("/dl/<token>/<name>", methods=["GET"])
|
||||
|
||||
Reference in New Issue
Block a user