Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

fix(dashboard): validation issues when creating webhook or discord integration

Carl-Gerhard Lindesvärd36ca39c8c8e0
diff --git a/apps/dashboard/src/components/integrations/forms/discord-integration.tsx b/apps/dashboard/src/components/integrations/forms/discord-integration.tsx
index ecb46ce9d..9e8740203 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<IForm>({
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 2941527e7..7eb020749 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<IForm>({
defaultValues: mergeDeepRight(
{
id: defaultValues?.id,
organizationId,
+ projectId,
config: {
type: 'webhook' as const,
url: '',