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
Этот коммит содержится в:
коммит произвёл
Gabe Jackson
родитель
427effcd5c
Коммит
cee1e36859
12
app/post.go
12
app/post.go
@@ -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 {
|
||||
|
||||
Ссылка в новой задаче
Block a user