diff options
Diffstat (limited to 'server_config.go')
| -rw-r--r-- | server_config.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server_config.go b/server_config.go index 50d93ff..c9c553c 100644 --- a/server_config.go +++ b/server_config.go @@ -31,6 +31,8 @@ type ServerConfig struct { // The address to listen for HTTP server and APIs. Address string `ini:"server::address"` + Notifs []*NotifConfig `ini:"notif"` + // IsDevelopment run the server in development mode with direct access // to file system in _www instead of using [embed.FS]. IsDevelopment bool @@ -76,5 +78,12 @@ func (cfg *ServerConfig) init() (err error) { cfg.Address = defAddress } + for _, notifConfig := range cfg.Notifs { + err = notifConfig.init() + if err != nil { + return fmt.Errorf(`%s: %w`, logp, err) + } + } + return nil } |
