Fix routes not being registered

This commit is contained in:
Pablu23
2024-06-04 21:01:14 +02:00
parent b0c204ec68
commit 05ca6c9b1b

View File

@@ -85,6 +85,8 @@ func (s *Server) Start() error {
Addr: fmt.Sprintf(":%d", s.options.Port),
Handler: s.mux,
}
s.RegisterRoutes()
s.registerUpdater()
if s.options.Auth.Enabled {
auth := s.options.Auth.Get()
@@ -102,8 +104,6 @@ func (s *Server) Start() error {
server.Handler = s.Auth(s.mux)
}
s.registerUpdater()
if s.options.Tls.Enabled {
tls := s.options.Tls.Get()
log.Info().Int("Port", s.options.Port).Str("Cert", tls.CertPath).Str("Key", tls.KeyPath).Msg("Starting server")