From 36ca39c8c8e06da5421d2659b2b64df1f603b53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesva=CC=88rd?= Date: Mon, 7 Oct 2024 11:03:16 +0200 Subject: [PATCH] fix(dashboard): validation issues when creating webhook or discord integration --- .../src/components/integrations/forms/discord-integration.tsx | 3 ++- .../src/components/integrations/forms/webhook-integration.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/dashboard/src/components/integrations/forms/discord-integration.tsx b/apps/dashboard/src/components/integrations/forms/discord-integration.tsx index ecb46ce9..9e874020 100644 --- a/apps/dashboard/src/components/integrations/forms/discord-integration.tsx +++ b/apps/dashboard/src/components/integrations/forms/discord-integration.tsx @@ -19,12 +19,13 @@ export function DiscordIntegrationForm({ defaultValues?: RouterOutputs['integration']['get']; onSuccess: () => void; }) { - const { organizationId } = useAppParams(); + const { organizationId, projectId } = useAppParams(); const form = useForm({ defaultValues: mergeDeepRight( { id: defaultValues?.id, organizationId, + projectId, config: { type: 'discord' as const, url: '', diff --git a/apps/dashboard/src/components/integrations/forms/webhook-integration.tsx b/apps/dashboard/src/components/integrations/forms/webhook-integration.tsx index 2941527e..7eb02074 100644 --- a/apps/dashboard/src/components/integrations/forms/webhook-integration.tsx +++ b/apps/dashboard/src/components/integrations/forms/webhook-integration.tsx @@ -20,12 +20,13 @@ export function WebhookIntegrationForm({ defaultValues?: RouterOutputs['integration']['get']; onSuccess: () => void; }) { - const { organizationId } = useAppParams(); + const { organizationId, projectId } = useAppParams(); const form = useForm({ defaultValues: mergeDeepRight( { id: defaultValues?.id, organizationId, + projectId, config: { type: 'webhook' as const, url: '',