0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Disabled model auto-refresh when triggering a webhook

- we don't use the updated model here so we don't need to fetch the
  latest info after saving to the DB
This commit is contained in:
Daniel Lockyer 2023-03-22 10:47:08 +01:00 committed by Daniel Lockyer
parent 45dcfa2032
commit 3623a652ba

View file

@ -31,7 +31,7 @@ class WebhookTrigger {
last_triggered_at: Date.now(),
last_triggered_status: data.statusCode,
last_triggered_error: data.error || null
}, {id: webhook.id})
}, {id: webhook.id, autoRefresh: false})
.catch(() => {
logging.warn(`Unable to update "last_triggered" for webhook: ${webhook.id}`);
});