Added: Bug Fixes

This commit is contained in:
shreyvishal
2025-06-25 16:30:47 +05:30
parent 02c69b98b6
commit 7a0a78d43d
12 changed files with 405 additions and 104 deletions

View File

@@ -29,6 +29,8 @@ var handlerProviders = map[handler.Type]Provider{
// It iterates over the module configurations, retrieves appropriate handler providers,
// and registers the handlers with the HTTP multiplexer.
func Register(ctx context.Context, mCfgs []Config, mux *http.ServeMux, mgr handler.PluginManager) error {
mux.Handle("/health", http.HandlerFunc(handler.HealthHandler))
log.Debugf(ctx, "Registering modules with config: %#v", mCfgs)
// Iterate over the handlers in the configuration.
for _, c := range mCfgs {
@@ -79,4 +81,4 @@ func moduleCtxMiddleware(moduleName string, next http.Handler) http.Handler {
ctx := context.WithValue(r.Context(), model.ContextKeyModuleID, moduleName)
next.ServeHTTP(w, r.WithContext(ctx))
})
}
}