mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-30 12:09:54 +00:00
Fix: Newly created DNS records not appearing in the display table. Improved database query consistency and error handling.
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/c498368e-812e-4074-a2b0-5b1c897c3ee4.jpg
This commit is contained in:
+6
-1
@@ -82,11 +82,16 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
return res.status(400).json({ message: "Domain ID is required" });
|
||||
}
|
||||
|
||||
console.log(`API endpoint: Fetching DNS records for domain: ${domainId}`);
|
||||
const records = await storage.getDnsRecordsByDomain(domainId);
|
||||
console.log(`API endpoint: Retrieved ${records.length} DNS records from storage`);
|
||||
res.json(records);
|
||||
} catch (error) {
|
||||
console.error("Error fetching DNS records:", error);
|
||||
res.status(500).json({ message: "Internal server error" });
|
||||
res.status(500).json({
|
||||
message: "Failed to fetch DNS records",
|
||||
error: error instanceof Error ? error.message : String(error)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user