diff --git a/src/lib/helpers/domains.ts b/src/lib/helpers/domains.ts index 18e47e5f4..cb5283e35 100644 --- a/src/lib/helpers/domains.ts +++ b/src/lib/helpers/domains.ts @@ -32,8 +32,8 @@ export async function createRecord(record: Partial, domainId: string) domainId, record.name, record.value, - record.priority || 10, record.ttl, + record.priority || 10, record?.comment || undefined ); case 'TXT': diff --git a/src/routes/(console)/organization-[organization]/domains/domain-[domain]/createRecordModal.svelte b/src/routes/(console)/organization-[organization]/domains/domain-[domain]/createRecordModal.svelte index eda93dfcf..644732c58 100644 --- a/src/routes/(console)/organization-[organization]/domains/domain-[domain]/createRecordModal.svelte +++ b/src/routes/(console)/organization-[organization]/domains/domain-[domain]/createRecordModal.svelte @@ -27,6 +27,8 @@ let priority: number; let comment: string; let error = ''; + let weight: number; + let port: number; async function handleSubmit() { const record = { @@ -35,7 +37,9 @@ value, ttl, priority, - comment + comment, + weight, + port }; try { await createRecord(record, page.params.domain); @@ -92,20 +96,32 @@ - - - - - Sets the priority for this DNS record. Lower numbers indicate higher - priority (e.g., 10 is higher than 20). - - - + {#if type === 'MX'} + + + + + Sets the priority for this DNS record. Lower numbers indicate higher + priority (e.g., 10 is higher than 20). + + + + {/if} + {#if type === 'SRV'} + + + + + {/if}