forked from snxraven/p2ns
show loading indicators when actions are pending
This commit is contained in:
@@ -48,8 +48,11 @@ async function handleDomainsRoutes(req, res) {
|
||||
} catch (err) {
|
||||
// Fallback if plugin system not available
|
||||
}
|
||||
// Only add internal domains that aren't already in the resolved list
|
||||
for (const d of internalDomains) {
|
||||
resolved.push({ domain: d, hash: 'internal', isLocal: true });
|
||||
if (!resolved.some(r => r.domain === d)) {
|
||||
resolved.push({ domain: d, hash: 'internal', isLocal: true });
|
||||
}
|
||||
}
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
res.end(JSON.stringify(resolved.sort((a, b) => a.domain.localeCompare(b.domain))));
|
||||
|
||||
Reference in New Issue
Block a user