adding simple list

This commit is contained in:
2023-08-20 11:12:39 +03:00
parent 8377ed7508
commit dcd7c97b99
3 changed files with 21 additions and 2 deletions

View File

@@ -159,6 +159,16 @@ def ls():
return "Error", 401
return "\n".join(file_list()), 200
@app.route("/ls-simple", methods=["GET"])
def ls_simple():
"""
Lists token/names
"""
secret = request.headers.get("Secret", "")
if secret != app.config["ACCESS_TOKEN"]:
return "Error", 401
return "\n".join(file_list_simple()), 200
@app.route("/maintenance", methods=["GET"])
def maintenance():