get admin_token for admin api

This commit is contained in:
G3G4X5X6 2024-04-16 11:14:51 +08:00
parent 88bef72cf8
commit a558ea6b04

View File

@ -404,6 +404,13 @@ def task_delete(taskid):
# Admin functions #
###################
@get("/admin/token")
def get_token():
"""
get admin_token for admin api
"""
return jsonize({"success": True, "token": DataStore.admin_token})
@get("/admin/list")
@get("/admin/<token>/list")
def task_list(token=None):