diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-06-14 09:38:19 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-06-14 07:38:19 -0600 |
commit | a0cc913b85dea5023b705697afa5cd8749a6e5de (patch) | |
tree | debe3365ea1e66e94bd0a4738bf4faa0f10eac05 /api/api.go | |
parent | 661f221727109f2298812fea89347bfeaf984109 (diff) | |
download | chat-a0cc913b85dea5023b705697afa5cd8749a6e5de.tar.gz chat-a0cc913b85dea5023b705697afa5cd8749a6e5de.tar.bz2 chat-a0cc913b85dea5023b705697afa5cd8749a6e5de.zip |
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
Diffstat (limited to 'api/api.go')
-rw-r--r-- | api/api.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api/api.go b/api/api.go index 3404e0c0b..37172260b 100644 --- a/api/api.go +++ b/api/api.go @@ -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)) |