norgbackup/norg/notifier/notifier.nim

8 lines
318 B
Nim
Raw Normal View History

import ../model/state_type
import ../model/notifier_types
2024-08-19 03:21:46 +02:00
proc notify*(notifiers: Notifiers, state: State, runtime: int = 0, msg: string = ""): int {.discardable.} =
2024-08-18 16:12:44 +02:00
if notifiers.uptimekuma.base_url != "" and
state in notifiers.uptimekuma.states:
2024-08-19 03:21:46 +02:00
notifiers.uptimekuma.send_notify(state, runtime, msg)