MM-15846 migrating get posts to sync by default (#10994)

* migrating get posts to sync by default

* flow control and style changes

* style changes, error checking

* pulling master down

* counting missed cache, not hit

* fixing bad conflict resolution

* forcing rebuild
Этот коммит содержится в:
Evan do Carmo
2019-05-30 10:44:33 -04:00
коммит произвёл Gabe Jackson
родитель 427effcd5c
Коммит cee1e36859
7 изменённых файлов: 73 добавлений и 70 удалений

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

@@ -599,19 +599,11 @@ func (a *App) PatchPost(postId string, patch *model.PostPatch) (*model.Post, *mo
}
func (a *App) GetPostsPage(channelId string, page int, perPage int) (*model.PostList, *model.AppError) {
result := <-a.Srv.Store.Post().GetPosts(channelId, page*perPage, perPage, true)
if result.Err != nil {
return nil, result.Err
}
return result.Data.(*model.PostList), nil
return a.Srv.Store.Post().GetPosts(channelId, page*perPage, perPage, true)
}
func (a *App) GetPosts(channelId string, offset int, limit int) (*model.PostList, *model.AppError) {
result := <-a.Srv.Store.Post().GetPosts(channelId, offset, limit, true)
if result.Err != nil {
return nil, result.Err
}
return result.Data.(*model.PostList), nil
return a.Srv.Store.Post().GetPosts(channelId, offset, limit, true)
}
func (a *App) GetPostsEtag(channelId string) string {