[MM-15121] Migrate "WebHook.GetIncomingList" to Sync by default (#10666)
* SyncStore: migrate WebHooks.SaveIncoming method to Sync * MM-15121 Migrate WebHook.GetIncomingList to Sync by default * MM-15121 Migrate WebHook.GetIncomingList to Sync by default - add review changes * Revert "SyncStore: migrate WebHooks.SaveIncoming method to Sync" This reverts commit 626a7d1a256e6ffe1dae108918d4129501947951.
Этот коммит содержится в:
коммит произвёл
Miguel de la Cruz
родитель
105e8647f8
Коммит
357065e202
@@ -175,16 +175,15 @@ func (s SqlWebhookStore) PermanentDeleteIncomingByChannel(channelId string) stor
|
||||
})
|
||||
}
|
||||
|
||||
func (s SqlWebhookStore) GetIncomingList(offset, limit int) store.StoreChannel {
|
||||
return store.Do(func(result *store.StoreResult) {
|
||||
var webhooks []*model.IncomingWebhook
|
||||
func (s SqlWebhookStore) GetIncomingList(offset, limit int) ([]*model.IncomingWebhook, *model.AppError) {
|
||||
var webhooks []*model.IncomingWebhook
|
||||
|
||||
if _, err := s.GetReplica().Select(&webhooks, "SELECT * FROM IncomingWebhooks WHERE DeleteAt = 0 LIMIT :Limit OFFSET :Offset", map[string]interface{}{"Limit": limit, "Offset": offset}); err != nil {
|
||||
result.Err = model.NewAppError("SqlWebhookStore.GetIncomingList", "store.sql_webhooks.get_incoming_by_user.app_error", nil, "err="+err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
if _, err := s.GetReplica().Select(&webhooks, "SELECT * FROM IncomingWebhooks WHERE DeleteAt = 0 LIMIT :Limit OFFSET :Offset", map[string]interface{}{"Limit": limit, "Offset": offset}); err != nil {
|
||||
return nil, model.NewAppError("SqlWebhookStore.GetIncomingList", "store.sql_webhooks.get_incoming_by_user.app_error", nil, "err="+err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
return webhooks, nil
|
||||
|
||||
result.Data = webhooks
|
||||
})
|
||||
}
|
||||
|
||||
func (s SqlWebhookStore) GetIncomingByTeam(teamId string, offset, limit int) ([]*model.IncomingWebhook, *model.AppError) {
|
||||
|
||||
Ссылка в новой задаче
Block a user