Migrate CommandWebhook.TryUse to sync by default (#11593)

Этот коммит содержится в:
Rodrigo Villablanca Vásquez
2019-07-09 16:57:05 -04:00
коммит произвёл Jesús Espino
родитель ff89b2c8e1
Коммит 678c8f4f84
5 изменённых файлов: 18 добавлений и 21 удалений

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

@@ -699,8 +699,8 @@ func (a *App) HandleCommandWebhook(hookId string, response *model.CommandRespons
ParentId: hook.ParentId,
}
if result := <-a.Srv.Store.CommandWebhook().TryUse(hook.Id, 5); result.Err != nil {
return model.NewAppError("HandleCommandWebhook", "web.command_webhook.invalid.app_error", nil, "err="+result.Err.Message, result.Err.StatusCode)
if err = a.Srv.Store.CommandWebhook().TryUse(hook.Id, 5); err != nil {
return model.NewAppError("HandleCommandWebhook", "web.command_webhook.invalid.app_error", nil, "err="+err.Message, err.StatusCode)
}
_, err = a.HandleCommandResponse(cmd, args, response, false)