diff --git a/hub/route/provider.go b/hub/route/provider.go index 163ee26a..e8c985a8 100644 --- a/hub/route/provider.go +++ b/hub/route/provider.go @@ -94,8 +94,8 @@ func getRuleProviders(w http.ResponseWriter, r *http.Request) { } func updateRuleProvider(w http.ResponseWriter, r *http.Request) { - provider := r.Context().Value(CtxKeyProvider).(*provider.RuleProvider) - if err := (*provider).Update(); err != nil { + provider := r.Context().Value(CtxKeyProvider).(provider.RuleProvider) + if err := provider.Update(); err != nil { render.Status(r, http.StatusServiceUnavailable) render.JSON(w, r, newError(err.Error())) }