correct uptime kuma msg

This commit is contained in:
Paul Wilde 2024-08-27 18:37:48 +01:00
parent 1265871c33
commit 53b68a1930

View file

@ -14,7 +14,9 @@ proc send_notify*(uk: UptimeKuma, state: State, runtime: int = 0, msg: string =
status = "up" status = "up"
else: else:
status = "down" status = "down"
let message = fmt"{status}:{msg}" var message = fmt"{status}"
if msg != "":
message &= fmt":{msg}"
let url = fmt"{uk.base_url}?status={status}&msg={message}&ping={runtime}" let url = fmt"{uk.base_url}?status={status}&msg={message}&ping={runtime}"
echo "Sending notification to " & url echo "Sending notification to " & url