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

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-10-07 11:03:16 +02:00
parent 1e3b90c971
commit 36ca39c8c8
2 changed files with 4 additions and 2 deletions

View File

@@ -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: '',

View File

@@ -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: '',