From bd04d7f75698c7b68434199208dc469021b823c2 Mon Sep 17 00:00:00 2001 From: Akash Srivastava Date: Wed, 10 Oct 2018 18:53:36 +0530 Subject: Add GetPostsForChannel method to plugin API (#9557) Signed-off-by: Akash Srivastava --- app/plugin_api.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app') diff --git a/app/plugin_api.go b/app/plugin_api.go index fc7adbcd9..8def80180 100644 --- a/app/plugin_api.go +++ b/app/plugin_api.go @@ -307,6 +307,10 @@ func (api *PluginAPI) GetPost(postId string) (*model.Post, *model.AppError) { return api.app.GetSinglePost(postId) } +func (api *PluginAPI) GetPostsForChannel(channelId string, page, perPage int) (*model.PostList, *model.AppError) { + return api.app.GetPostsPage(channelId, page, perPage) +} + func (api *PluginAPI) UpdatePost(post *model.Post) (*model.Post, *model.AppError) { return api.app.UpdatePost(post, false) } -- cgit v1.2.3-1-g7c22