update webhook keepalive

This commit is contained in:
2025-06-21 23:51:52 +02:00
parent eeeca4ed4e
commit e9e44f67a2

View File

@ -18,13 +18,12 @@ export async function sendWebhook<T extends WebhookAction>(action: T, data: Webh
while (true) { while (true) {
try { try {
const response = await fetch(WEBHOOK_ENDPOINT, { const response = await fetch(WEBHOOK_ENDPOINT, {
body: JSON.stringify(data),
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'x-webhook-action': action 'x-webhook-action': action
}, },
keepalive: false body: JSON.stringify(data),
}); });
if (response.status === 200) return; if (response.status === 200) return;