mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-06 17:15:38 -08:00
BE: /logs endpoint, comments resolution, github template
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -390,6 +390,10 @@ def api_clean_log():
|
||||
|
||||
@app.route("/logs/add-to-execution-queue", methods=["POST"])
|
||||
def api_add_to_execution_queue():
|
||||
|
||||
if not is_authorized():
|
||||
return jsonify({"success": False, "message": "ERROR: Not authorized", "error": "Forbidden"}), 403
|
||||
|
||||
queue = UserEventsQueueInstance()
|
||||
|
||||
# Get JSON payload safely
|
||||
|
||||
@@ -52,7 +52,7 @@ def clean_log(log_file):
|
||||
except Exception as e:
|
||||
msg = f"[clean_log] ERROR Failed to purge {log_file}: {e}"
|
||||
|
||||
mylog('none', [])
|
||||
write_notification(msg)
|
||||
return jsonify({"success": False, "message": msg}), 200
|
||||
mylog('none', [msg])
|
||||
write_notification(msg, 'interrupt')
|
||||
return jsonify({"success": False, "message": msg}), 500
|
||||
|
||||
|
||||
Reference in New Issue
Block a user