feat: Add logging when discord token not found
All checks were successful
Build Docker / BuildImage (push) Successful in 32s

This commit is contained in:
Nathan Woodburn 2024-09-12 15:44:53 +10:00
parent 1716fa16db
commit 8f950f8de5
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -392,7 +392,10 @@ def send_notification(title, description,author):
"attachments": [], "attachments": [],
} }
response = requests.post(discord_hook, json=data) response = requests.post(discord_hook, json=data)
print(response.text, flush=True) print("Sent notification", flush=True)
else:
print("No discord hook", flush=True)
def send_down_notification(node): def send_down_notification(node):
title = f"{node['name']} is down" title = f"{node['name']} is down"
@ -624,6 +627,10 @@ def api_all():
history = get_history(history_days) history = get_history(history_days)
return jsonify(history) return jsonify(history)
@app.route("/api/refresh")
def api_refresh():
node_status = check_nodes()
return jsonify(node_status)
# endregion # endregion