[MM-15296] Migrate "Preference.Save" to Sync by default (#10866)
* response format changes * Generated mocks Fixed all references of Preferences.Save * Remove old code from store.go (incorrect merge) * Review change - Add validations on count and error * Review change - return from root level * Review change - return 0 as nil value for int * fix initialisation of err in preference_store
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
c05cf5b033
Коммит
fb6c1debf0
@@ -183,17 +183,24 @@ func (_m *PreferenceStore) PermanentDeleteByUser(userId string) *model.AppError
|
||||
}
|
||||
|
||||
// Save provides a mock function with given fields: preferences
|
||||
func (_m *PreferenceStore) Save(preferences *model.Preferences) store.StoreChannel {
|
||||
func (_m *PreferenceStore) Save(preferences *model.Preferences) (int, *model.AppError) {
|
||||
ret := _m.Called(preferences)
|
||||
|
||||
var r0 store.StoreChannel
|
||||
if rf, ok := ret.Get(0).(func(*model.Preferences) store.StoreChannel); ok {
|
||||
var r0 int
|
||||
if rf, ok := ret.Get(0).(func(*model.Preferences) int); ok {
|
||||
r0 = rf(preferences)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(store.StoreChannel)
|
||||
r0 = ret.Get(0).(int)
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(*model.Preferences) *model.AppError); ok {
|
||||
r1 = rf(preferences)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user