mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-3143 Added serverside code for custom Emoji (#3311)
* Added model objects for emoji * Added database tables for emoji * Added settings for custom emoji * Added serverside APIs and unit tests for custom emoji * Added additional validation to catch duplicate emoji names earlier on * Added additional validation to prevent users from adding emoji as another user
This commit is contained in:
committed by
Christopher Speller
parent
661f221727
commit
a0cc913b85
@@ -46,6 +46,8 @@ type Routes struct {
|
||||
License *mux.Router // 'api/v3/license'
|
||||
|
||||
Public *mux.Router // 'api/v3/public'
|
||||
|
||||
Emoji *mux.Router // 'api/v3/emoji'
|
||||
}
|
||||
|
||||
var BaseRoutes *Routes
|
||||
@@ -72,6 +74,7 @@ func InitApi() {
|
||||
BaseRoutes.Preferences = BaseRoutes.ApiRoot.PathPrefix("/preferences").Subrouter()
|
||||
BaseRoutes.License = BaseRoutes.ApiRoot.PathPrefix("/license").Subrouter()
|
||||
BaseRoutes.Public = BaseRoutes.ApiRoot.PathPrefix("/public").Subrouter()
|
||||
BaseRoutes.Emoji = BaseRoutes.ApiRoot.PathPrefix("/emoji").Subrouter()
|
||||
|
||||
InitUser()
|
||||
InitTeam()
|
||||
@@ -86,6 +89,7 @@ func InitApi() {
|
||||
InitWebhook()
|
||||
InitPreference()
|
||||
InitLicense()
|
||||
InitEmoji()
|
||||
|
||||
// 404 on any api route before web.go has a chance to serve it
|
||||
Srv.Router.Handle("/api/{anything:.*}", http.HandlerFunc(Handle404))
|
||||
|
||||
Reference in New Issue
Block a user