diff options
author | Ethel Morgan <eth@ethulhu.co.uk> | 2020-07-07 21:33:17 +0100 |
---|---|---|
committer | Ethel Morgan <eth@ethulhu.co.uk> | 2020-07-07 21:33:17 +0100 |
commit | 18c71c082747f5ed76b87ee2b8a2e4c729557625 (patch) | |
tree | 4e61426b5149971b70c9e74fb1a96307aa7d9e7b | |
parent | b990b615d88d208d86b45d31271ce974d2290ba0 (diff) |
rename route /actions/ to /triggers/
-rw-r--r-- | cmd/dispatch/main.go | 6 |
1 files 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() |