From 188fe56203896b7a9923e61ab8a2ea5845d41ee6 Mon Sep 17 00:00:00 2001 From: Stefan Terdell Date: Sun, 7 Jul 2024 15:11:45 +0200 Subject: [PATCH] Optional jobId webhook URL templating --- apps/api/src/services/webhook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/services/webhook.ts b/apps/api/src/services/webhook.ts index fc5962b7..18378546 100644 --- a/apps/api/src/services/webhook.ts +++ b/apps/api/src/services/webhook.ts @@ -2,7 +2,7 @@ import { supabase_service } from "./supabase"; export const callWebhook = async (teamId: string, jobId: string,data: any) => { try { - const selfHostedUrl = process.env.SELF_HOSTED_WEBHOOK_URL; + const selfHostedUrl = process.env.SELF_HOSTED_WEBHOOK_URL?.replace("{{JOB_ID}}", jobId); const useDbAuthentication = process.env.USE_DB_AUTHENTICATION === 'true'; let webhookUrl = selfHostedUrl;