Fix problems with new Options

This commit is contained in:
Pablu23
2024-06-04 20:58:59 +02:00
parent 8f65d81015
commit b0c204ec68

View File

@@ -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")