From 18c71c082747f5ed76b87ee2b8a2e4c729557625 Mon Sep 17 00:00:00 2001 From: Ethel Morgan Date: Tue, 7 Jul 2020 21:33:17 +0100 Subject: rename route /actions/ to /triggers/ --- cmd/dispatch/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/dispatch/main.go b/cmd/dispatch/main.go index a940584..c33b7c1 100644 --- a/cmd/dispatch/main.go +++ b/cmd/dispatch/main.go @@ -64,9 +64,9 @@ func main() { m := mux.NewRouter() m.NotFoundHandler = httputil.NotFoundHandler - m.PathPrefix("/actions/{action}"). + m.PathPrefix("/triggers/{action}"). Methods("POST"). - Handler(http.StripPrefix("/actions", triggerAction(config))) + Handler(http.StripPrefix("/triggers", postTrigger(config))) m.Use(httputil.Logger) @@ -76,7 +76,7 @@ func main() { } } -func triggerAction(config *config.Config) http.HandlerFunc { +func postTrigger(config *config.Config) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { ctx := r.Context() -- cgit v1.2.3