norgbackup/norg/notifier/notifier.nim

7 lines
295 B
Nim

import ../model/state_type
import ../model/notifier_types
proc notify*(notifiers: Notifiers, state: State, runtime: int = 0): int {.discardable.} =
if notifiers.uptimekuma.base_url != "" and
state in notifiers.uptimekuma.states:
notifiers.uptimekuma.send_notify(state, runtime)