summaryrefslogtreecommitdiffstats
path: root/api4/api.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-03-13 12:49:19 -0400
committerGitHub <noreply@github.com>2017-03-13 12:49:19 -0400
commit59d06b5c56f487570867cdc8b87b2e29c04d450f (patch)
treebbefc2d11719fe778e9c07cb3bffd159a806373b /api4/api.go
parent27d2c1f6febdc6b80f60837086ebe0c08f975147 (diff)
downloadchat-59d06b5c56f487570867cdc8b87b2e29c04d450f.tar.gz
chat-59d06b5c56f487570867cdc8b87b2e29c04d450f.tar.bz2
chat-59d06b5c56f487570867cdc8b87b2e29c04d450f.zip
Implement GET /cluster/status endpoint for APIv4 (#5732)
Diffstat (limited to 'api4/api.go')
-rw-r--r--api4/api.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/api4/api.go b/api4/api.go
index fb0ca2758..d5a44731f 100644
--- a/api4/api.go
+++ b/api4/api.go
@@ -59,13 +59,11 @@ type Routes struct {
OutgoingHooks *mux.Router // 'api/v4/hooks/outgoing'
OutgoingHook *mux.Router // 'api/v4/hooks/outgoing/{hook_id:[A-Za-z0-9]+}'
- OAuth *mux.Router // 'api/v4/oauth'
-
- SAML *mux.Router // 'api/v4/saml'
-
- Admin *mux.Router // 'api/v4/admin'
-
+ Admin *mux.Router // 'api/v4/admin'
+ OAuth *mux.Router // 'api/v4/oauth'
+ SAML *mux.Router // 'api/v4/saml'
Compliance *mux.Router // 'api/v4/compliance'
+ Cluster *mux.Router // 'api/v4/cluster'
System *mux.Router // 'api/v4/system'
@@ -137,6 +135,7 @@ func InitApi(full bool) {
BaseRoutes.OAuth = BaseRoutes.ApiRoot.PathPrefix("/oauth").Subrouter()
BaseRoutes.Admin = BaseRoutes.ApiRoot.PathPrefix("/admin").Subrouter()
BaseRoutes.Compliance = BaseRoutes.ApiRoot.PathPrefix("/compliance").Subrouter()
+ BaseRoutes.Cluster = BaseRoutes.ApiRoot.PathPrefix("/cluster").Subrouter()
BaseRoutes.System = BaseRoutes.ApiRoot.PathPrefix("/system").Subrouter()
BaseRoutes.Preferences = BaseRoutes.User.PathPrefix("/preferences").Subrouter()
BaseRoutes.License = BaseRoutes.ApiRoot.PathPrefix("/license").Subrouter()
@@ -157,6 +156,7 @@ func InitApi(full bool) {
InitPreference()
InitSaml()
InitCompliance()
+ InitCluster()
app.Srv.Router.Handle("/api/v4/{anything:.*}", http.HandlerFunc(Handle404))