From b0c204ec68af2f9aaba9816e2ff71f105e07237f Mon Sep 17 00:00:00 2001 From: Pablu23 Date: Tue, 4 Jun 2024 20:58:59 +0200 Subject: [PATCH] Fix problems with new Options --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index cbf9e16..5d2bf0c 100644 --- a/main.go +++ b/main.go @@ -51,7 +51,11 @@ func main() { mux := http.NewServeMux() s := server.New(&provider.Bato{}, &db, mux, func(o *server.Options) { authOptions := setupAuth() - o.Auth.Set(authOptions) + o.Port = *portFlag + + if *secretFlag != "" || *secretFilePathFlag != "" || *authFlag { + o.Auth.Set(authOptions) + } interval, err := time.ParseDuration(*updateIntervalFlag) if err != nil { log.Fatal().Err(err).Str("Interval", *updateIntervalFlag).Msg("Could not parse interval")