APIv4 GET /posts/{post_id}/reactions (#6047)
Этот коммит содержится в:
коммит произвёл
George Goldberg
родитель
d2be3de2d3
Коммит
e841d0c502
16
app/reaction.go
Обычный файл
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
|
||||
}
|
||||
}
|
||||
Ссылка в новой задаче
Block a user