[MM-24522] remove duplication in OR and IncludeDeletedChannels params for search (#14573)

Этот коммит содержится в:
Abdulkadir Poyraz
2020-08-31 14:40:58 +03:00
коммит произвёл GitHub
родитель 2b1da58e6d
Коммит f12ca27bac
12 изменённых файлов: 182 добавлений и 132 удалений

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

@@ -815,13 +815,13 @@ func (_m *PostStore) Search(teamId string, userId string, params *model.SearchPa
return r0, r1
}
// SearchPostsInTeamForUser provides a mock function with given fields: paramsList, userId, teamId, isOrSearch, includeDeletedChannels, page, perPage
func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId string, teamId string, isOrSearch bool, includeDeletedChannels bool, page int, perPage int) (*model.PostSearchResults, *model.AppError) {
ret := _m.Called(paramsList, userId, teamId, isOrSearch, includeDeletedChannels, page, perPage)
// SearchPostsInTeamForUser provides a mock function with given fields: paramsList, userId, teamId, page, perPage
func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams, userId string, teamId string, page int, perPage int) (*model.PostSearchResults, *model.AppError) {
ret := _m.Called(paramsList, userId, teamId, page, perPage)
var r0 *model.PostSearchResults
if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, bool, bool, int, int) *model.PostSearchResults); ok {
r0 = rf(paramsList, userId, teamId, isOrSearch, includeDeletedChannels, page, perPage)
if rf, ok := ret.Get(0).(func([]*model.SearchParams, string, string, int, int) *model.PostSearchResults); ok {
r0 = rf(paramsList, userId, teamId, page, perPage)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*model.PostSearchResults)
@@ -829,8 +829,8 @@ func (_m *PostStore) SearchPostsInTeamForUser(paramsList []*model.SearchParams,
}
var r1 *model.AppError
if rf, ok := ret.Get(1).(func([]*model.SearchParams, string, string, bool, bool, int, int) *model.AppError); ok {
r1 = rf(paramsList, userId, teamId, isOrSearch, includeDeletedChannels, page, perPage)
if rf, ok := ret.Get(1).(func([]*model.SearchParams, string, string, int, int) *model.AppError); ok {
r1 = rf(paramsList, userId, teamId, page, perPage)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)