summaryrefslogtreecommitdiffstats
path: root/api4/api.go
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-03-14 06:13:48 +0900
committerJoram Wilander <jwawilander@gmail.com>2017-03-13 17:13:48 -0400
commitaafc63933a7e213261e28ac7f528cea50b70e1af (patch)
treea5488a45998df8a3143cd8f4d836b05fbd1e3319 /api4/api.go
parent24496cd0b278352b44e9411d924185e306fa346b (diff)
downloadchat-aafc63933a7e213261e28ac7f528cea50b70e1af.tar.gz
chat-aafc63933a7e213261e28ac7f528cea50b70e1af.tar.bz2
chat-aafc63933a7e213261e28ac7f528cea50b70e1af.zip
APIv4: GET /files/{file_id}/public (#5665)
Diffstat (limited to 'api4/api.go')
-rw-r--r--api4/api.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/api4/api.go b/api4/api.go
index d5a44731f..29986f551 100644
--- a/api4/api.go
+++ b/api4/api.go
@@ -49,6 +49,8 @@ type Routes struct {
Files *mux.Router // 'api/v4/files'
File *mux.Router // 'api/v4/files/{file_id:[A-Za-z0-9]+}'
+ PublicFile *mux.Router // 'files/{file_id:[A-Za-z0-9]+}/public'
+
Commands *mux.Router // 'api/v4/commands'
Command *mux.Router // 'api/v4/commands/{command_id:[A-Za-z0-9]+}'
CommandsForTeam *mux.Router // 'api/v4/teams/{team_id:[A-Za-z0-9]+}/commands'
@@ -120,6 +122,7 @@ func InitApi(full bool) {
BaseRoutes.Files = BaseRoutes.ApiRoot.PathPrefix("/files").Subrouter()
BaseRoutes.File = BaseRoutes.Files.PathPrefix("/{file_id:[A-Za-z0-9]+}").Subrouter()
+ BaseRoutes.PublicFile = BaseRoutes.Root.PathPrefix("/files/{file_id:[A-Za-z0-9]+}/public").Subrouter()
BaseRoutes.Commands = BaseRoutes.ApiRoot.PathPrefix("/commands").Subrouter()
BaseRoutes.Command = BaseRoutes.Commands.PathPrefix("/{command_id:[A-Za-z0-9]+}").Subrouter()