slight tweak to uptime kumanotifier
This commit is contained in:
parent
d043f12784
commit
1265871c33
1 changed files with 2 additions and 2 deletions
|
@ -8,13 +8,13 @@ type
|
|||
UptimeKuma* = object of Notifier
|
||||
|
||||
proc send_notify*(uk: UptimeKuma, state: State, runtime: int = 0, msg: string = ""): int {.discardable.} =
|
||||
var status: string
|
||||
var status: string = "down"
|
||||
case state
|
||||
of Success, Running:
|
||||
status = "up"
|
||||
else:
|
||||
status = "down"
|
||||
let message = fmt"{status}\r\n{msg}"
|
||||
let message = fmt"{status}:{msg}"
|
||||
let url = fmt"{uk.base_url}?status={status}&msg={message}&ping={runtime}"
|
||||
|
||||
echo "Sending notification to " & url
|
||||
|
|
Loading…
Reference in a new issue