MM-15118: Migrates the "WebHook.DeleteIncoming" to Sync by default. (#10706)
* cherry commit for DeleteIncoming and generate store mocks * go fmt the code and fix go vet issue
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
13403b2cc1
Коммит
eb3923c835
@@ -826,7 +826,7 @@ func (a *App) DeleteChannel(channel *model.Channel, userId string) *model.AppErr
|
||||
|
||||
now := model.GetMillis()
|
||||
for _, hook := range incomingHooks {
|
||||
if result := <-a.Srv.Store.Webhook().DeleteIncoming(hook.Id, now); result.Err != nil {
|
||||
if err := a.Srv.Store.Webhook().DeleteIncoming(hook.Id, now); err != nil {
|
||||
mlog.Error(fmt.Sprintf("Encountered error deleting incoming webhook, id=%v", hook.Id))
|
||||
}
|
||||
a.InvalidateCacheForWebhook(hook.Id)
|
||||
|
||||
@@ -360,8 +360,8 @@ func (a *App) DeleteIncomingWebhook(hookId string) *model.AppError {
|
||||
return model.NewAppError("DeleteIncomingWebhook", "api.incoming_webhook.disabled.app_error", nil, "", http.StatusNotImplemented)
|
||||
}
|
||||
|
||||
if result := <-a.Srv.Store.Webhook().DeleteIncoming(hookId, model.GetMillis()); result.Err != nil {
|
||||
return result.Err
|
||||
if err := a.Srv.Store.Webhook().DeleteIncoming(hookId, model.GetMillis()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
a.InvalidateCacheForWebhook(hookId)
|
||||
|
||||
Ссылка в новой задаче
Block a user