fix: use readConfig
This commit is contained in:
parent
b69e3d4ef3
commit
91479478b9
1 changed files with 2 additions and 1 deletions
3
main.go
3
main.go
|
@ -33,7 +33,7 @@ func readConfig() (config.Config, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
cfg, err := config.ReadConfig("config.scfg")
|
cfg, err := readConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error("failed to read config", "error", err)
|
slog.Error("failed to read config", "error", err)
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
|
@ -77,6 +77,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
slog.Debug("Registering bridge", "route", route, "handler", handler.Type)
|
slog.Debug("Registering bridge", "route", route, "handler", handler.Type)
|
||||||
|
// TODO: use default topic if topic == ""
|
||||||
bridge := bridge.NewBridge(cfg.Ntfy.Server, handler.Topic, h)
|
bridge := bridge.NewBridge(cfg.Ntfy.Server, handler.Topic, h)
|
||||||
if !auth.IsEmpty() {
|
if !auth.IsEmpty() {
|
||||||
bridge.WithAuth(auth)
|
bridge.WithAuth(auth)
|
||||||
|
|
Loading…
Reference in a new issue