diff --git a/http/check_service.go b/http/check_service.go index 911e68e18c..da3ddb31b0 100644 --- a/http/check_service.go +++ b/http/check_service.go @@ -89,13 +89,13 @@ func NewCheckHandler(log *zap.Logger, b *CheckBackend) *CheckHandler { OrganizationService: b.OrganizationService, } - h.Handler("POST", prefixChecks, withFeatureProxy(b.AlgoWProxy, h.handlePostCheck)) + h.Handler("POST", prefixChecks, withFeatureProxy(b.AlgoWProxy, http.HandlerFunc(h.handlePostCheck))) h.HandlerFunc("GET", prefixChecks, h.handleGetChecks) h.HandlerFunc("GET", checksIDPath, h.handleGetCheck) h.HandlerFunc("GET", checksIDQueryPath, h.handleGetCheckQuery) h.HandlerFunc("DELETE", checksIDPath, h.handleDeleteCheck) - h.Handler("PUT", checksIDPath, withFeatureProxy(b.AlgoWProxy, h.handlePutCheck)) - h.Handler("PATCH", checksIDPath, withFeatureProxy(b.AlgoWProxy, h.handlePatchCheck)) + h.Handler("PUT", checksIDPath, withFeatureProxy(b.AlgoWProxy, http.HandlerFunc(h.handlePutCheck))) + h.Handler("PATCH", checksIDPath, withFeatureProxy(b.AlgoWProxy, http.HandlerFunc(h.handlePatchCheck))) memberBackend := MemberBackend{ HTTPErrorHandler: b.HTTPErrorHandler, diff --git a/http/notification_rule.go b/http/notification_rule.go index e704681cbe..1667bceb25 100644 --- a/http/notification_rule.go +++ b/http/notification_rule.go @@ -99,13 +99,13 @@ func NewNotificationRuleHandler(log *zap.Logger, b *NotificationRuleBackend) *No TaskService: b.TaskService, } - h.Handler("POST", prefixNotificationRules, withFeatureProxy(b.AlgoWProxy, h.handlePostNotificationRule)) + h.Handler("POST", prefixNotificationRules, withFeatureProxy(b.AlgoWProxy, http.HandlerFunc(h.handlePostNotificationRule))) h.HandlerFunc("GET", prefixNotificationRules, h.handleGetNotificationRules) h.HandlerFunc("GET", notificationRulesIDPath, h.handleGetNotificationRule) h.HandlerFunc("GET", notificationRulesIDQueryPath, h.handleGetNotificationRuleQuery) h.HandlerFunc("DELETE", notificationRulesIDPath, h.handleDeleteNotificationRule) - h.Handler("PUT", notificationRulesIDPath, withFeatureProxy(b.AlgoWProxy, h.handlePutNotificationRule)) - h.Handler("PATCH", notificationRulesIDPath, withFeatureProxy(b.AlgoWProxy, h.handlePatchNotificationRule)) + h.Handler("PUT", notificationRulesIDPath, withFeatureProxy(b.AlgoWProxy, http.HandlerFunc(h.handlePutNotificationRule))) + h.Handler("PATCH", notificationRulesIDPath, withFeatureProxy(b.AlgoWProxy, http.HandlerFunc(h.handlePatchNotificationRule))) memberBackend := MemberBackend{ HTTPErrorHandler: b.HTTPErrorHandler, diff --git a/http/proxy_handler.go b/http/proxy_handler.go index 287244e287..a765dca6da 100644 --- a/http/proxy_handler.go +++ b/http/proxy_handler.go @@ -7,7 +7,7 @@ import ( var _ http.Handler = &proxyHandler{} // withFeatureProxy wraps an HTTP handler in a proxyHandler -func withFeatureProxy(proxy FeatureProxyHandler, h http.HandlerFunc) *proxyHandler { +func withFeatureProxy(proxy FeatureProxyHandler, h http.Handler) *proxyHandler { if proxy == nil { proxy = &NoopProxyHandler{} } diff --git a/http/task_service.go b/http/task_service.go index 60a3709a26..7ddfee8f02 100644 --- a/http/task_service.go +++ b/http/task_service.go @@ -100,10 +100,10 @@ func NewTaskHandler(log *zap.Logger, b *TaskBackend) *TaskHandler { } h.HandlerFunc("GET", prefixTasks, h.handleGetTasks) - h.Handler("POST", prefixTasks, withFeatureProxy(b.AlgoWProxy, h.handlePostTask)) + h.Handler("POST", prefixTasks, withFeatureProxy(b.AlgoWProxy, http.HandlerFunc(h.handlePostTask))) h.HandlerFunc("GET", tasksIDPath, h.handleGetTask) - h.Handler("PATCH", tasksIDPath, withFeatureProxy(b.AlgoWProxy, h.handleUpdateTask)) + h.Handler("PATCH", tasksIDPath, withFeatureProxy(b.AlgoWProxy, http.HandlerFunc(h.handleUpdateTask))) h.HandlerFunc("DELETE", tasksIDPath, h.handleDeleteTask) h.HandlerFunc("GET", tasksIDLogsPath, h.handleGetLogs)