From 60cf74352f13874a7d07c609c03b1c763af19cea Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Thu, 3 May 2018 14:00:26 +0100 Subject: 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. --- api4/api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'api4/api.go') 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)) -- cgit v1.2.3-1-g7c22