[MM-15297] Migrate "Preference.Get" to Sync by default #10721 (#10811)

* modify Get method in preference_store

* modify interface to match changes on preference store Get method

* modify variable initialization

* fix behavior on GetPreferenceByCategoryAndNameForUser
Этот коммит содержится в:
Ivana Irene Thomas
2019-05-15 19:20:26 +07:00
коммит произвёл Miguel de la Cruz
родитель b3e09715df
Коммит a68ad55151
8 изменённых файлов: 56 добавлений и 52 удалений

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

@@ -78,19 +78,28 @@ func (_m *PreferenceStore) DeleteCategoryAndName(category string, name string) s
}
// Get provides a mock function with given fields: userId, category, name
func (_m *PreferenceStore) Get(userId string, category string, name string) store.StoreChannel {
func (_m *PreferenceStore) Get(userId string, category string, name string) (*model.Preference, *model.AppError) {
ret := _m.Called(userId, category, name)
var r0 store.StoreChannel
if rf, ok := ret.Get(0).(func(string, string, string) store.StoreChannel); ok {
var r0 *model.Preference
if rf, ok := ret.Get(0).(func(string, string, string) *model.Preference); ok {
r0 = rf(userId, category, name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(store.StoreChannel)
r0 = ret.Get(0).(*model.Preference)
}
}
return r0
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string, string, string) *model.AppError); ok {
r1 = rf(userId, category, name)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// GetAll provides a mock function with given fields: userId