ACTUALLY fix blacklisting
This commit is contained in:
+2
-2
@@ -58,13 +58,13 @@ router.post('/domains/new', authMw.AllowIfAuthenticated, async(req, res, next) =
|
||||
// Make sure domain is valid
|
||||
const domainLabel = reqBody.register_domain_label;
|
||||
const domainTLD = reqBody.register_domain_tld;
|
||||
const fullDomain = domainLabel + "." + domainLabel;
|
||||
const fullDomain = domainLabel + "." + domainTLD;
|
||||
|
||||
if(validationError !== undefined)
|
||||
errors = validationError.details;
|
||||
|
||||
if(blacklistedDomains.includes(fullDomain.toLowerCase())) {
|
||||
errors.push('Domain is not available.');
|
||||
errors.push({message: 'Domain is not available.'});
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user