From e9a1690f080f7a3dcdd8e46e417b2b6283d89296 Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Thu, 10 Apr 2025 00:26:57 +0000 Subject: [PATCH] Fix: Update DNS record ID type to string Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/3e2f315e-dd7d-4551-8044-737bd8913ee9.jpg --- client/src/pages/dns-records.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/pages/dns-records.tsx b/client/src/pages/dns-records.tsx index 9cd903c..3942dfa 100644 --- a/client/src/pages/dns-records.tsx +++ b/client/src/pages/dns-records.tsx @@ -81,14 +81,14 @@ const dnsRecordSchema = z.object({ export default function DnsRecordsPage() { const { toast } = useToast(); - const [domainId, setDomainId] = useState(null); + const [domainId, setDomainId] = useState(null); // Get domainId from query params useEffect(() => { const params = new URLSearchParams(window.location.search); const id = params.get("domainId"); if (id) { - setDomainId(parseInt(id)); + setDomainId(id); } }, []); @@ -186,7 +186,7 @@ export default function DnsRecordsPage() { // Update DNS record mutation const updateRecordMutation = useMutation({ - mutationFn: async ({ id, data }: { id: number, data: z.infer }) => { + mutationFn: async ({ id, data }: { id: string, data: z.infer }) => { const res = await apiRequest("PUT", `/api/dns-records/${id}`, data); return await res.json(); }, @@ -210,7 +210,7 @@ export default function DnsRecordsPage() { // Delete DNS record mutation const deleteRecordMutation = useMutation({ - mutationFn: async (recordId: number) => { + mutationFn: async (recordId: string) => { await apiRequest("DELETE", `/api/dns-records/${recordId}`); }, onSuccess: () => {