Clean types in webhooks.ts

This commit is contained in:
zkldi
2022-03-31 00:00:55 +01:00
parent 72c8f2d2c9
commit e4323fa1bc
+2 -2
View File
@@ -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: {