Migrate User.PermanentDelete to Sync by default (#10876)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5a8c07412b
Коммит
1269db8691
@@ -18,7 +18,7 @@ func (a *App) CreateBot(bot *model.Bot) (*model.Bot, *model.AppError) {
|
||||
|
||||
result = <-a.Srv.Store.Bot().Save(bot)
|
||||
if result.Err != nil {
|
||||
<-a.Srv.Store.User().PermanentDelete(bot.UserId)
|
||||
a.Srv.Store.User().PermanentDelete(bot.UserId)
|
||||
return nil, result.Err
|
||||
}
|
||||
|
||||
@@ -119,8 +119,8 @@ func (a *App) PermanentDeleteBot(botUserId string) *model.AppError {
|
||||
return result.Err
|
||||
}
|
||||
|
||||
if result := <-a.Srv.Store.User().PermanentDelete(botUserId); result.Err != nil {
|
||||
return result.Err
|
||||
if err := a.Srv.Store.User().PermanentDelete(botUserId); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -1483,8 +1483,8 @@ func (a *App) PermanentDeleteUser(user *model.User) *model.AppError {
|
||||
return err
|
||||
}
|
||||
|
||||
if result := <-a.Srv.Store.User().PermanentDelete(user.Id); result.Err != nil {
|
||||
return result.Err
|
||||
if err := a.Srv.Store.User().PermanentDelete(user.Id); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := a.Srv.Store.Audit().PermanentDeleteByUser(user.Id); err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user