MM 15119 : migrates the "WebHook.PermanentDeleteIncomingByUser" to Sync by default. (#10705)
* cherry commit for PermanentDeleteIncomingByUser and generate store mocks * go fmt the code
Этот коммит содержится в:
коммит произвёл
Miguel de la Cruz
родитель
3989b90a91
Коммит
2f237d68b7
@@ -153,15 +153,14 @@ func (s SqlWebhookStore) DeleteIncoming(webhookId string, time int64) store.Stor
|
||||
})
|
||||
}
|
||||
|
||||
func (s SqlWebhookStore) PermanentDeleteIncomingByUser(userId string) store.StoreChannel {
|
||||
return store.Do(func(result *store.StoreResult) {
|
||||
_, err := s.GetMaster().Exec("DELETE FROM IncomingWebhooks WHERE UserId = :UserId", map[string]interface{}{"UserId": userId})
|
||||
if err != nil {
|
||||
result.Err = model.NewAppError("SqlWebhookStore.DeleteIncomingByUser", "store.sql_webhooks.permanent_delete_incoming_by_user.app_error", nil, "id="+userId+", err="+err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
func (s SqlWebhookStore) PermanentDeleteIncomingByUser(userId string) *model.AppError {
|
||||
_, err := s.GetMaster().Exec("DELETE FROM IncomingWebhooks WHERE UserId = :UserId", map[string]interface{}{"UserId": userId})
|
||||
if err != nil {
|
||||
return model.NewAppError("SqlWebhookStore.DeleteIncomingByUser", "store.sql_webhooks.permanent_delete_incoming_by_user.app_error", nil, "id="+userId+", err="+err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
s.ClearCaches()
|
||||
})
|
||||
s.ClearCaches()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s SqlWebhookStore) PermanentDeleteIncomingByChannel(channelId string) *model.AppError {
|
||||
|
||||
Ссылка в новой задаче
Block a user