fix: align forward params with backend, use Option<bool> for default handling

This commit is contained in:
rustmailer
2025-07-22 20:54:30 +08:00
parent 67285d3451
commit 4e80c6d979
6 changed files with 35 additions and 31 deletions
@@ -85,7 +85,7 @@ export function EventHooksMutateDrawer({ open, onOpenChange, currentRow }: Props
const httpForm = useForm<HttpEventHookForm>({
resolver: zodResolver(httpFormSchema),
defaultValues: currentRow ? {
account_id: currentRow.account_id,
account_id: currentRow.account_id ?? undefined,
description: currentRow.description ?? undefined,
enabled: currentRow.enabled,
global: currentRow.global === 1,
@@ -101,7 +101,7 @@ export function EventHooksMutateDrawer({ open, onOpenChange, currentRow }: Props
const natsForm = useForm<NatsEventHookForm>({
resolver: zodResolver(natsFormSchema),
defaultValues: currentRow ? {
account_id: currentRow.account_id,
account_id: currentRow.account_id ?? undefined,
description: currentRow.description,
enabled: currentRow.enabled,
global: currentRow.global === 1,
@@ -131,7 +131,8 @@ export function EmailActionDialog({
include_all_attachments: false,
send_control: {
save_to_sent: false,
dry_run: false
dry_run: false,
enable_tracking: false
}
});
} else {
@@ -145,7 +146,8 @@ export function EmailActionDialog({
include_all_attachments: false,
send_control: {
save_to_sent: false,
dry_run: false
dry_run: false,
enable_tracking: false
}
});
}