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