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.
Этот коммит содержится в:
коммит произвёл
Martin Kraft
родитель
7d5e85e413
Коммит
60cf74352f
@@ -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))
|
||||
|
||||
Ссылка в новой задаче
Block a user