mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-29 11:46:55 +00:00
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
This commit is contained in:
@@ -81,14 +81,14 @@ const dnsRecordSchema = z.object({
|
|||||||
|
|
||||||
export default function DnsRecordsPage() {
|
export default function DnsRecordsPage() {
|
||||||
const { toast } = useToast();
|
const { toast } = useToast();
|
||||||
const [domainId, setDomainId] = useState<number | null>(null);
|
const [domainId, setDomainId] = useState<string | null>(null);
|
||||||
|
|
||||||
// Get domainId from query params
|
// Get domainId from query params
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const id = params.get("domainId");
|
const id = params.get("domainId");
|
||||||
if (id) {
|
if (id) {
|
||||||
setDomainId(parseInt(id));
|
setDomainId(id);
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ export default function DnsRecordsPage() {
|
|||||||
|
|
||||||
// Update DNS record mutation
|
// Update DNS record mutation
|
||||||
const updateRecordMutation = useMutation({
|
const updateRecordMutation = useMutation({
|
||||||
mutationFn: async ({ id, data }: { id: number, data: z.infer<typeof dnsRecordSchema> }) => {
|
mutationFn: async ({ id, data }: { id: string, data: z.infer<typeof dnsRecordSchema> }) => {
|
||||||
const res = await apiRequest("PUT", `/api/dns-records/${id}`, data);
|
const res = await apiRequest("PUT", `/api/dns-records/${id}`, data);
|
||||||
return await res.json();
|
return await res.json();
|
||||||
},
|
},
|
||||||
@@ -210,7 +210,7 @@ export default function DnsRecordsPage() {
|
|||||||
|
|
||||||
// Delete DNS record mutation
|
// Delete DNS record mutation
|
||||||
const deleteRecordMutation = useMutation({
|
const deleteRecordMutation = useMutation({
|
||||||
mutationFn: async (recordId: number) => {
|
mutationFn: async (recordId: string) => {
|
||||||
await apiRequest("DELETE", `/api/dns-records/${recordId}`);
|
await apiRequest("DELETE", `/api/dns-records/${recordId}`);
|
||||||
},
|
},
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user