Files
ntfy-bridge/template.v
T
bruno 4e1d7cd94a Add config validation and dashboard
Add YAML config loading with validation, env overrides for secrets, and
a web dashboard exposing health, stats, and recent events.
2026-08-03 12:12:12 -04:00

16 lines
350 B
V

module main
import sources
// apply_defaults fills in default priority and tags when the event doesn't set them.
pub fn apply_defaults(event sources.Event, defaults DefaultConfig) sources.Event {
mut e := event.clone()
if e.priority == 0 {
e.priority = defaults.priority
}
if e.tags.len == 0 {
e.tags = defaults.tags.clone()
}
return e
}