norgbackup/norg/notifier/notifier.nim

8 lines
308 B
Nim
Raw Normal View History

import ../model/state_type
import ../model/notifier_types
2024-11-25 12:20:50 +01:00
proc notify*(notifiers: Notifiers, state: State, runtime: int = 0, msg: string = ""): int =
2024-08-18 16:12:44 +02:00
if notifiers.uptimekuma.base_url != "" and
state in notifiers.uptimekuma.states:
2024-11-25 12:20:50 +01:00
return notifiers.uptimekuma.send_notify(state, runtime, msg)