Sync DNS2 production changes - removed obsolete test suite and refactored structure
This commit is contained in:
@@ -11,7 +11,7 @@ module.exports = function(ctx, helpers) {
|
||||
success: true,
|
||||
templates: ctx.APP_TEMPLATES,
|
||||
categories: ctx.TEMPLATE_CATEGORIES,
|
||||
difficultyLevels: ctx.DIFFICULTY_LEVELS,
|
||||
difficultyLevels: ctx.DIFFICULTY_LEVELS
|
||||
});
|
||||
}, 'apps-templates'));
|
||||
|
||||
@@ -71,7 +71,7 @@ module.exports = function(ctx, helpers) {
|
||||
try {
|
||||
const oldDomain = oldSubdomain.includes('.') ? oldSubdomain : ctx.buildDomain(oldSubdomain);
|
||||
const result = await ctx.dns.call(ctx.siteConfig.dnsServerIp, '/api/zones/records/delete', {
|
||||
token: ctx.dns.getToken(), domain: oldDomain, type: 'A', ipAddress: ip || 'localhost',
|
||||
token: ctx.dns.getToken(), domain: oldDomain, type: 'A', ipAddress: ip || 'localhost'
|
||||
});
|
||||
results.oldDns = result.status === 'ok' ? 'deleted' : result.errorMessage;
|
||||
ctx.log.info('dns', 'Old DNS record deleted', { domain: oldDomain });
|
||||
@@ -139,7 +139,7 @@ module.exports = function(ctx, helpers) {
|
||||
success: true,
|
||||
message: `Subdomain updated: ${oldSubdomain} -> ${newSubdomain}`,
|
||||
newUrl: `https://${ctx.buildDomain(newSubdomain)}`,
|
||||
results,
|
||||
results
|
||||
});
|
||||
}, 'update-subdomain'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user