Migrate Delete/Restore/SetDeleteAt methods from ChannelStore to return error interface (#14700)
Automatic Merge
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
18ddae2c1b
Коммит
ac32b2da41
@@ -643,7 +643,7 @@ func (a *App) RestoreChannel(channel *model.Channel, userId string) (*model.Chan
|
||||
}
|
||||
|
||||
if err := a.Srv().Store.Channel().Restore(channel.Id, model.GetMillis()); err != nil {
|
||||
return nil, err
|
||||
return nil, model.NewAppError("RestoreChannel", "app.channel.restore.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
channel.DeleteAt = 0
|
||||
a.invalidateCacheForChannel(channel)
|
||||
@@ -1197,7 +1197,7 @@ func (a *App) DeleteChannel(channel *model.Channel, userId string) *model.AppErr
|
||||
deleteAt := model.GetMillis()
|
||||
|
||||
if err := a.Srv().Store.Channel().Delete(channel.Id, deleteAt); err != nil {
|
||||
return err
|
||||
return model.NewAppError("DeleteChannel", "app.channel.delete.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
a.invalidateCacheForChannel(channel)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user