APIv4 GET /posts/{post_id}/reactions (#6047)

Этот коммит содержится в:
Saturnino Abril
2017-04-11 22:14:33 +09:00
коммит произвёл George Goldberg
родитель d2be3de2d3
Коммит e841d0c502
5 изменённых файлов: 157 добавлений и 0 удалений

16
app/reaction.go Обычный файл
Просмотреть файл

@@ -0,0 +1,16 @@
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package app
import (
"github.com/mattermost/platform/model"
)
func GetReactionsForPost(postId string) ([]*model.Reaction, *model.AppError) {
if result := <-Srv.Store.Reaction().GetForPost(postId, true); result.Err != nil {
return nil, result.Err
} else {
return result.Data.([]*model.Reaction), nil
}
}