made the preference store GetCategory method sync (#10847)
* made the preference store GetCategory method sync * fixed the review comments
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
2130e9f0b1
Коммит
24a02b4168
@@ -119,19 +119,28 @@ func (_m *PreferenceStore) GetAll(userId string) store.StoreChannel {
|
||||
}
|
||||
|
||||
// GetCategory provides a mock function with given fields: userId, category
|
||||
func (_m *PreferenceStore) GetCategory(userId string, category string) store.StoreChannel {
|
||||
func (_m *PreferenceStore) GetCategory(userId string, category string) (model.Preferences, *model.AppError) {
|
||||
ret := _m.Called(userId, category)
|
||||
|
||||
var r0 store.StoreChannel
|
||||
if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok {
|
||||
var r0 model.Preferences
|
||||
if rf, ok := ret.Get(0).(func(string, string) model.Preferences); ok {
|
||||
r0 = rf(userId, category)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(store.StoreChannel)
|
||||
r0 = ret.Get(0).(model.Preferences)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok {
|
||||
r1 = rf(userId, category)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// IsFeatureEnabled provides a mock function with given fields: feature, userId
|
||||
|
||||
Ссылка в новой задаче
Block a user