ACTUALLY fix blacklisting
This commit is contained in:
@@ -103,6 +103,15 @@ body {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#RequestErrors {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#RequestErrors li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.SelectedListItem {
|
||||
background-color: #2e69cb;
|
||||
color: white;
|
||||
|
||||
+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 {
|
||||
|
||||
@@ -2,14 +2,6 @@
|
||||
|
||||
<p>Manage your registered domains</p>
|
||||
|
||||
{{#if errors}}
|
||||
<ul>
|
||||
{{#each errors}}
|
||||
<li>{{this.message}}</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
||||
<div class="InsetContentBox" id="DomainSelection">
|
||||
<div style="width: 600px;"></div>
|
||||
<ul>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<br>
|
||||
<div>
|
||||
{{#if errors}}
|
||||
<ul>
|
||||
<ul id="RequestErrors">
|
||||
{{#each errors}}
|
||||
<li>{{this.message}}</li>
|
||||
{{/each}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<p>Register a new domain</p>
|
||||
|
||||
{{#if errors}}
|
||||
<ul>
|
||||
<ul id="RequestErrors">
|
||||
{{#each errors}}
|
||||
<li>{{this.message}}</li>
|
||||
{{/each}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<br>
|
||||
<div>
|
||||
{{#if errors}}
|
||||
<ul>
|
||||
<ul id="RequestErrors">
|
||||
{{#each errors}}
|
||||
<li>{{this.message}}</li>
|
||||
{{/each}}
|
||||
|
||||
Reference in New Issue
Block a user