diff --git a/beszel/internal/hub/hub.go b/beszel/internal/hub/hub.go index 8ca9f98d..ee7d1475 100644 --- a/beszel/internal/hub/hub.go +++ b/beszel/internal/hub/hub.go @@ -64,11 +64,6 @@ func (h *Hub) BootstrapHub() (*Hub, error) { } } - // initial setup - if err := h.initialize(); err != nil { - return nil, err - } - // serve web ui h.OnServe().BindFunc(h.startServer) // set up scheduled jobs @@ -85,6 +80,11 @@ func (h *Hub) BootstrapHub() (*Hub, error) { // start system updates h.sm.Initialize() + // initial setup + if err := h.initialize(); err != nil { + return nil, err + } + return h, nil } @@ -145,7 +145,6 @@ func (h *Hub) initialize() error { // Start starts the hub application / server func (h *Hub) Start() error { - // Use type assertion to access the Start method if pb, ok := h.App.(*pocketbase.PocketBase); ok { return pb.Start() }