Cleaning the store from functions returning StoreResult (#11602)

* Cleaning the store from functions returning StoreResult

* Removing unnecesary StoreChannel type
Этот коммит содержится в:
Jesús Espino
2019-07-29 12:38:46 +02:00
коммит произвёл GitHub
родитель c362f0e802
Коммит e067272e16
9 изменённых файлов: 109 добавлений и 210 удалений

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

@@ -158,9 +158,9 @@ func (a *App) CreatePost(post *model.Post, channel *model.Channel, triggerWebhoo
post.SanitizeProps()
var pchan store.StoreChannel
var pchan chan store.StoreResult
if len(post.RootId) > 0 {
pchan = make(store.StoreChannel, 1)
pchan = make(chan store.StoreResult, 1)
go func() {
r, pErr := a.Srv.Store.Post().Get(post.RootId)
pchan <- store.StoreResult{Data: r, Err: pErr}