made the Restore and Delete store method to be sync (#10835)
Этот коммит содержится в:
коммит произвёл
Hanzei
родитель
098dbc84cc
Коммит
5d1ee9373f
@@ -585,9 +585,8 @@ func (a *App) postChannelPrivacyMessage(user *model.User, channel *model.Channel
|
||||
}
|
||||
|
||||
func (a *App) RestoreChannel(channel *model.Channel) (*model.Channel, *model.AppError) {
|
||||
result := <-a.Srv.Store.Channel().Restore(channel.Id, model.GetMillis())
|
||||
if result.Err != nil {
|
||||
return nil, result.Err
|
||||
if err := a.Srv.Store.Channel().Restore(channel.Id, model.GetMillis()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return channel, nil
|
||||
}
|
||||
@@ -873,8 +872,8 @@ func (a *App) DeleteChannel(channel *model.Channel, userId string) *model.AppErr
|
||||
|
||||
deleteAt := model.GetMillis()
|
||||
|
||||
if dresult := <-a.Srv.Store.Channel().Delete(channel.Id, deleteAt); dresult.Err != nil {
|
||||
return dresult.Err
|
||||
if err := a.Srv.Store.Channel().Delete(channel.Id, deleteAt); err != nil {
|
||||
return err
|
||||
}
|
||||
a.InvalidateCacheForChannel(channel)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user