From e4323fa1bcf7c4e0e7f7db09ef09967f5fcad223 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Thu, 31 Mar 2022 00:00:55 +0100 Subject: [PATCH] Clean types in webhooks.ts --- server/src/lib/webhooks/webhooks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/lib/webhooks/webhooks.ts b/server/src/lib/webhooks/webhooks.ts index 3f4e08f30..58d6129f2 100644 --- a/server/src/lib/webhooks/webhooks.ts +++ b/server/src/lib/webhooks/webhooks.ts @@ -12,7 +12,7 @@ export async function GetWebhookUrlInfo() { { projection: { webhookUri: 1, clientSecret: 1 } } ); - return urls; + return urls as { webhookUri: string; clientSecret: string }[]; } /** @@ -26,7 +26,7 @@ export async function EmitWebhookEvent(content: WebhookEvents) { // We don't actually care about the response of these. Just fire them and forget. for (const client of webhookUrls) { // we know this to be non-null because of GetWebhookUrlInfo. - fetch(client.webhookUri!, { + fetch(client.webhookUri, { method: "POST", body: JSON.stringify(content), headers: {