summaryrefslogtreecommitdiffstats
path: root/app/post.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 /app/post.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 'app/post.go')
-rw-r--r--app/post.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/post.go b/app/post.go
index 7f38a9bd2..186aa5dcc 100644
--- a/app/post.go
+++ b/app/post.go
@@ -402,6 +402,14 @@ func GetFlaggedPostsForTeam(userId, teamId string, offset int, limit int) (*mode
}
}
+func GetFlaggedPostsForChannel(userId, channelId string, offset int, limit int) (*model.PostList, *model.AppError) {
+ if result := <-Srv.Store.Post().GetFlaggedPostsForChannel(userId, channelId, offset, limit); result.Err != nil {
+ return nil, result.Err
+ } else {
+ return result.Data.(*model.PostList), nil
+ }
+}
+
func GetPermalinkPost(postId string, userId string) (*model.PostList, *model.AppError) {
if result := <-Srv.Store.Post().Get(postId); result.Err != nil {
return nil, result.Err