APIv4 get /channels/{channel_id}/pinned (#5893)

This commit is contained in:
Saturnino Abril
2017-03-30 00:09:05 +09:00
committed by Corey Hulen
parent 64f80decaf
commit 8a31718db1
5 changed files with 102 additions and 0 deletions

View File

@@ -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
}
}