[MM-15120] Migrate PermanentDeleteIncomingByChannel to Sync (#10677)
* Migrate PermanentDeleteIncomingByChannel to Sync * fix err
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
928ecba2d4
Коммит
cf5f5be0d8
@@ -164,15 +164,15 @@ func (s SqlWebhookStore) PermanentDeleteIncomingByUser(userId string) store.Stor
|
||||
})
|
||||
}
|
||||
|
||||
func (s SqlWebhookStore) PermanentDeleteIncomingByChannel(channelId string) store.StoreChannel {
|
||||
return store.Do(func(result *store.StoreResult) {
|
||||
_, err := s.GetMaster().Exec("DELETE FROM IncomingWebhooks WHERE ChannelId = :ChannelId", map[string]interface{}{"ChannelId": channelId})
|
||||
if err != nil {
|
||||
result.Err = model.NewAppError("SqlWebhookStore.DeleteIncomingByChannel", "store.sql_webhooks.permanent_delete_incoming_by_channel.app_error", nil, "id="+channelId+", err="+err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
func (s SqlWebhookStore) PermanentDeleteIncomingByChannel(channelId string) *model.AppError {
|
||||
_, err := s.GetMaster().Exec("DELETE FROM IncomingWebhooks WHERE ChannelId = :ChannelId", map[string]interface{}{"ChannelId": channelId})
|
||||
if err != nil {
|
||||
return model.NewAppError("SqlWebhookStore.DeleteIncomingByChannel", "store.sql_webhooks.permanent_delete_incoming_by_channel.app_error", nil, "id="+channelId+", err="+err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
s.ClearCaches()
|
||||
})
|
||||
s.ClearCaches()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s SqlWebhookStore) GetIncomingList(offset, limit int) ([]*model.IncomingWebhook, *model.AppError) {
|
||||
|
||||
Ссылка в новой задаче
Block a user