mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
APIv4 get /channels/{channel_id}/pinned (#5893)
This commit is contained in:
committed by
Corey Hulen
parent
64f80decaf
commit
8a31718db1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user