update domain registration and dns frontend
This commit is contained in:
+1
-1
@@ -33,7 +33,7 @@ async function RegisterNewDomain(domain) {
|
||||
if (!prefix) throw new Error("Invalid domain");
|
||||
|
||||
const key = `${prefix}`;
|
||||
const value = JSON.stringify({ type: 'A', host: '10.66.66.1' });
|
||||
const value = JSON.stringify({ type: 'A', host: '10.66.66.1', ttl: '300' });
|
||||
|
||||
await client.put(key).value(value);
|
||||
}
|
||||
|
||||
+2
-4
@@ -28,13 +28,11 @@ router.get('/dns/edit/:domainId', authMw.AllowIfAuthenticated, async (req, res,
|
||||
const fullDomain = result.domain + "." + result.tld;
|
||||
const rawRecords = await GetAllRecords(fullDomain);
|
||||
let records = [];
|
||||
let recordHeaders = ["Domain"];
|
||||
let recordHeaders = [];
|
||||
|
||||
for(const [key, value] of Object.entries(rawRecords)) {
|
||||
let parsedVal = JSON.parse(value);
|
||||
let finalRecord = {
|
||||
domain: CoreDNSToDomain(key)
|
||||
};
|
||||
let finalRecord = {};
|
||||
|
||||
for(const [key, value] of Object.entries(parsedVal)) {
|
||||
if(!recordHeaders.includes(key)) {
|
||||
|
||||
Reference in New Issue
Block a user