summaryrefslogtreecommitdiffstats
path: root/api4/api.go
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-04-06 05:18:23 +0900
committerJoram Wilander <jwawilander@gmail.com>2017-04-05 16:18:23 -0400
commitd8b732a488233d9b763d2c43ded60a420e1746a6 (patch)
tree31c4b67ab22caa912337e358aa1a68034638d36d /api4/api.go
parent51608b583a8a4254574d95618df9046954ebdef5 (diff)
downloadchat-d8b732a488233d9b763d2c43ded60a420e1746a6.tar.gz
chat-d8b732a488233d9b763d2c43ded60a420e1746a6.tar.bz2
chat-d8b732a488233d9b763d2c43ded60a420e1746a6.zip
APIv4 GET /users/{user_id}/posts/flagged (#5984)
* APIv4 GET /users/{user_id}/posts/flagged * change permission check
Diffstat (limited to 'api4/api.go')
-rw-r--r--api4/api.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/api4/api.go b/api4/api.go
index dffed60e4..ea46c8ee5 100644
--- a/api4/api.go
+++ b/api4/api.go
@@ -47,6 +47,7 @@ type Routes struct {
Posts *mux.Router // 'api/v4/posts'
Post *mux.Router // 'api/v4/posts/{post_id:[A-Za-z0-9]+}'
PostsForChannel *mux.Router // 'api/v4/channels/{channel_id:[A-Za-z0-9]+}/posts'
+ PostsForUser *mux.Router // 'api/v4/users/{user_id:[A-Za-z0-9]+}/posts'
Files *mux.Router // 'api/v4/files'
File *mux.Router // 'api/v4/files/{file_id:[A-Za-z0-9]+}'
@@ -126,6 +127,7 @@ func InitApi(full bool) {
BaseRoutes.Posts = BaseRoutes.ApiRoot.PathPrefix("/posts").Subrouter()
BaseRoutes.Post = BaseRoutes.Posts.PathPrefix("/{post_id:[A-Za-z0-9]+}").Subrouter()
BaseRoutes.PostsForChannel = BaseRoutes.Channel.PathPrefix("/posts").Subrouter()
+ BaseRoutes.PostsForUser = BaseRoutes.User.PathPrefix("/posts").Subrouter()
BaseRoutes.Files = BaseRoutes.ApiRoot.PathPrefix("/files").Subrouter()
BaseRoutes.File = BaseRoutes.Files.PathPrefix("/{file_id:[A-Za-z0-9]+}").Subrouter()