From 8a31718db11c803fa3b14f85c760ca9db6083670 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Thu, 30 Mar 2017 00:09:05 +0900 Subject: APIv4 get /channels/{channel_id}/pinned (#5893) --- app/channel.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/channel.go') diff --git a/app/channel.go b/app/channel.go index 5278abbfe..61b139e5b 100644 --- a/app/channel.go +++ b/app/channel.go @@ -1053,3 +1053,11 @@ func PermanentDeleteChannel(channel *model.Channel) *model.AppError { return nil } + +func GetPinnedPosts(channelId string) (*model.PostList, *model.AppError) { + if result := <-Srv.Store.Channel().GetPinnedPosts(channelId); result.Err != nil { + return nil, result.Err + } else { + return result.Data.(*model.PostList), nil + } +} -- cgit v1.2.3-1-g7c22