MM-15864 - Made Post.GetRepliesForExport sync (#11046)

* Changed Post.GetRepliesForExport to be sync

* Removed else, and renamed err

* renamed result variable to replyPosts
Этот коммит содержится в:
Will Andrews
2019-06-06 19:29:54 +01:00
коммит произвёл Jesse Hallam
родитель 6a42ad2af5
Коммит 2d14eef6c7
5 изменённых файлов: 48 добавлений и 44 удалений

Просмотреть файл

@@ -379,14 +379,12 @@ func (a *App) ExportAllPosts(writer io.Writer) *model.AppError {
func (a *App) buildPostReplies(postId string) (*[]ReplyImportData, *model.AppError) {
var replies []ReplyImportData
result := <-a.Srv.Store.Post().GetRepliesForExport(postId)
replyPosts, err := a.Srv.Store.Post().GetRepliesForExport(postId)
if result.Err != nil {
return nil, result.Err
if err != nil {
return nil, err
}
replyPosts := result.Data.([]*model.ReplyForExport)
for _, reply := range replyPosts {
replyImportObject := ImportReplyFromPost(reply)
if reply.HasReactions == true {