fix(dashboard): validation issues when creating webhook or discord integration
This commit is contained in:
@@ -19,12 +19,13 @@ export function DiscordIntegrationForm({
|
|||||||
defaultValues?: RouterOutputs['integration']['get'];
|
defaultValues?: RouterOutputs['integration']['get'];
|
||||||
onSuccess: () => void;
|
onSuccess: () => void;
|
||||||
}) {
|
}) {
|
||||||
const { organizationId } = useAppParams();
|
const { organizationId, projectId } = useAppParams();
|
||||||
const form = useForm<IForm>({
|
const form = useForm<IForm>({
|
||||||
defaultValues: mergeDeepRight(
|
defaultValues: mergeDeepRight(
|
||||||
{
|
{
|
||||||
id: defaultValues?.id,
|
id: defaultValues?.id,
|
||||||
organizationId,
|
organizationId,
|
||||||
|
projectId,
|
||||||
config: {
|
config: {
|
||||||
type: 'discord' as const,
|
type: 'discord' as const,
|
||||||
url: '',
|
url: '',
|
||||||
|
|||||||
@@ -20,12 +20,13 @@ export function WebhookIntegrationForm({
|
|||||||
defaultValues?: RouterOutputs['integration']['get'];
|
defaultValues?: RouterOutputs['integration']['get'];
|
||||||
onSuccess: () => void;
|
onSuccess: () => void;
|
||||||
}) {
|
}) {
|
||||||
const { organizationId } = useAppParams();
|
const { organizationId, projectId } = useAppParams();
|
||||||
const form = useForm<IForm>({
|
const form = useForm<IForm>({
|
||||||
defaultValues: mergeDeepRight(
|
defaultValues: mergeDeepRight(
|
||||||
{
|
{
|
||||||
id: defaultValues?.id,
|
id: defaultValues?.id,
|
||||||
organizationId,
|
organizationId,
|
||||||
|
projectId,
|
||||||
config: {
|
config: {
|
||||||
type: 'webhook' as const,
|
type: 'webhook' as const,
|
||||||
url: '',
|
url: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user