diff options
author | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-02-12 15:09:59 -0500 |
---|---|---|
committer | Derrick Anderson <derrick@andersonwebstudio.com> | 2018-02-12 15:09:59 -0500 |
commit | efd620d6c80ddc1f015811ec58514e34ee0b501b (patch) | |
tree | 8fdcc1043aba1c9a66382b915f4e185ade1128fb /api/api.go | |
parent | 87fb19b8279c86c72ffec623e55b80ce35b7d64f (diff) | |
parent | 1ae680aefae2deb1e9d07d7c2a1c863ec807a79f (diff) | |
download | chat-efd620d6c80ddc1f015811ec58514e34ee0b501b.tar.gz chat-efd620d6c80ddc1f015811ec58514e34ee0b501b.tar.bz2 chat-efd620d6c80ddc1f015811ec58514e34ee0b501b.zip |
Merge branch 'release-4.7' into icu669
Diffstat (limited to 'api/api.go')
-rw-r--r-- | api/api.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/api/api.go b/api/api.go index 2d65bb216..70f36db85 100644 --- a/api/api.go +++ b/api/api.go @@ -109,7 +109,7 @@ func Init(a *app.App, root *mux.Router) *API { api.InitReaction() // 404 on any api route before web.go has a chance to serve it - root.Handle("/api/{anything:.*}", http.HandlerFunc(Handle404)) + root.Handle("/api/{anything:.*}", http.HandlerFunc(api.Handle404)) a.InitEmailBatching() @@ -120,6 +120,10 @@ func Init(a *app.App, root *mux.Router) *API { return api } +func (api *API) Handle404(w http.ResponseWriter, r *http.Request) { + Handle404(api.App, w, r) +} + func ReturnStatusOK(w http.ResponseWriter) { m := make(map[string]string) m[model.STATUS] = model.STATUS_OK |