diff options
author | George Goldberg <george@gberg.me> | 2018-05-03 14:00:26 +0100 |
---|---|---|
committer | Martin Kraft <mkraft@users.noreply.github.com> | 2018-05-03 09:00:26 -0400 |
commit | 60cf74352f13874a7d07c609c03b1c763af19cea (patch) | |
tree | e8d670db30d8dd18645de44402554e7d64b278e4 /api4/api.go | |
parent | 7d5e85e4136b0e2e6cf902c48b186d99f0698d13 (diff) | |
download | chat-60cf74352f13874a7d07c609c03b1c763af19cea.tar.gz chat-60cf74352f13874a7d07c609c03b1c763af19cea.tar.bz2 chat-60cf74352f13874a7d07c609c03b1c763af19cea.zip |
MM-10140: API Implementation for Schemes related Endpoints (#8615)
* Implement basic scheme CRUD endpoints.
* Get All Schemes (Paged) Endpoint and store plumbing.
* Add get teams/channels for schemes.
* Fix unit tests.
* Review fixes.
* More review fixes.
Diffstat (limited to 'api4/api.go')
-rw-r--r-- | api4/api.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/api4/api.go b/api4/api.go index d36c3e3ee..f2821b42e 100644 --- a/api4/api.go +++ b/api4/api.go @@ -99,7 +99,8 @@ type Routes struct { Reactions *mux.Router // 'api/v4/reactions' - Roles *mux.Router // 'api/v4/roles' + Roles *mux.Router // 'api/v4/roles' + Schemes *mux.Router // 'api/v4/schemes' Emojis *mux.Router // 'api/v4/emoji' Emoji *mux.Router // 'api/v4/emoji/{emoji_id:[A-Za-z0-9]+}' @@ -200,6 +201,7 @@ func Init(a *app.App, root *mux.Router, full bool) *API { api.BaseRoutes.OpenGraph = api.BaseRoutes.ApiRoot.PathPrefix("/opengraph").Subrouter() api.BaseRoutes.Roles = api.BaseRoutes.ApiRoot.PathPrefix("/roles").Subrouter() + api.BaseRoutes.Schemes = api.BaseRoutes.ApiRoot.PathPrefix("/schemes").Subrouter() api.BaseRoutes.Image = api.BaseRoutes.ApiRoot.PathPrefix("/image").Subrouter() @@ -229,6 +231,7 @@ func Init(a *app.App, root *mux.Router, full bool) *API { api.InitOpenGraph() api.InitPlugin() api.InitRole() + api.InitScheme() api.InitImage() root.Handle("/api/v4/{anything:.*}", http.HandlerFunc(Handle404)) |