MM-26031: Migrate reaction store to plain errors (#14931)

* ReactionStore migration to return plain errors

* Fix translations

* FixImports

* Rollback fix imports

* Fix merge conflict

* add ent translation

Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Agniva De Sarker
2020-07-02 09:43:28 +05:30
коммит произвёл GitHub
родитель 00aeca0e5c
Коммит 71925ea224
12 изменённых файлов: 150 добавлений и 167 удалений

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

@@ -4780,7 +4780,7 @@ func (s *TimerLayerPreferenceStore) Save(preferences *model.Preferences) *model.
return resultVar0
}
func (s *TimerLayerReactionStore) BulkGetForPosts(postIds []string) ([]*model.Reaction, *model.AppError) {
func (s *TimerLayerReactionStore) BulkGetForPosts(postIds []string) ([]*model.Reaction, error) {
start := timemodule.Now()
resultVar0, resultVar1 := s.ReactionStore.BulkGetForPosts(postIds)
@@ -4796,7 +4796,7 @@ func (s *TimerLayerReactionStore) BulkGetForPosts(postIds []string) ([]*model.Re
return resultVar0, resultVar1
}
func (s *TimerLayerReactionStore) Delete(reaction *model.Reaction) (*model.Reaction, *model.AppError) {
func (s *TimerLayerReactionStore) Delete(reaction *model.Reaction) (*model.Reaction, error) {
start := timemodule.Now()
resultVar0, resultVar1 := s.ReactionStore.Delete(reaction)
@@ -4812,7 +4812,7 @@ func (s *TimerLayerReactionStore) Delete(reaction *model.Reaction) (*model.React
return resultVar0, resultVar1
}
func (s *TimerLayerReactionStore) DeleteAllWithEmojiName(emojiName string) *model.AppError {
func (s *TimerLayerReactionStore) DeleteAllWithEmojiName(emojiName string) error {
start := timemodule.Now()
resultVar0 := s.ReactionStore.DeleteAllWithEmojiName(emojiName)
@@ -4828,7 +4828,7 @@ func (s *TimerLayerReactionStore) DeleteAllWithEmojiName(emojiName string) *mode
return resultVar0
}
func (s *TimerLayerReactionStore) GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, *model.AppError) {
func (s *TimerLayerReactionStore) GetForPost(postId string, allowFromCache bool) ([]*model.Reaction, error) {
start := timemodule.Now()
resultVar0, resultVar1 := s.ReactionStore.GetForPost(postId, allowFromCache)
@@ -4844,7 +4844,7 @@ func (s *TimerLayerReactionStore) GetForPost(postId string, allowFromCache bool)
return resultVar0, resultVar1
}
func (s *TimerLayerReactionStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, *model.AppError) {
func (s *TimerLayerReactionStore) PermanentDeleteBatch(endTime int64, limit int64) (int64, error) {
start := timemodule.Now()
resultVar0, resultVar1 := s.ReactionStore.PermanentDeleteBatch(endTime, limit)
@@ -4860,7 +4860,7 @@ func (s *TimerLayerReactionStore) PermanentDeleteBatch(endTime int64, limit int6
return resultVar0, resultVar1
}
func (s *TimerLayerReactionStore) Save(reaction *model.Reaction) (*model.Reaction, *model.AppError) {
func (s *TimerLayerReactionStore) Save(reaction *model.Reaction) (*model.Reaction, error) {
start := timemodule.Now()
resultVar0, resultVar1 := s.ReactionStore.Save(reaction)