ACTUALLY fix blacklisting

This commit is contained in:
2026-05-14 13:39:55 -04:00
parent e1c9508ed3
commit 03bf12ec07
6 changed files with 14 additions and 13 deletions
+9
View File
@@ -103,6 +103,15 @@ body {
cursor: pointer; cursor: pointer;
} }
#RequestErrors {
color: red;
}
#RequestErrors li {
margin: 0;
padding: 0;
}
.SelectedListItem { .SelectedListItem {
background-color: #2e69cb; background-color: #2e69cb;
color: white; color: white;
+2 -2
View File
@@ -58,13 +58,13 @@ router.post('/domains/new', authMw.AllowIfAuthenticated, async(req, res, next) =
// Make sure domain is valid // Make sure domain is valid
const domainLabel = reqBody.register_domain_label; const domainLabel = reqBody.register_domain_label;
const domainTLD = reqBody.register_domain_tld; const domainTLD = reqBody.register_domain_tld;
const fullDomain = domainLabel + "." + domainLabel; const fullDomain = domainLabel + "." + domainTLD;
if(validationError !== undefined) if(validationError !== undefined)
errors = validationError.details; errors = validationError.details;
if(blacklistedDomains.includes(fullDomain.toLowerCase())) { if(blacklistedDomains.includes(fullDomain.toLowerCase())) {
errors.push('Domain is not available.'); errors.push({message: 'Domain is not available.'});
} }
try { try {
-8
View File
@@ -2,14 +2,6 @@
<p>Manage your registered domains</p> <p>Manage your registered domains</p>
{{#if errors}}
<ul>
{{#each errors}}
<li>{{this.message}}</li>
{{/each}}
</ul>
{{/if}}
<div class="InsetContentBox" id="DomainSelection"> <div class="InsetContentBox" id="DomainSelection">
<div style="width: 600px;"></div> <div style="width: 600px;"></div>
<ul> <ul>
+1 -1
View File
@@ -1,7 +1,7 @@
<br> <br>
<div> <div>
{{#if errors}} {{#if errors}}
<ul> <ul id="RequestErrors">
{{#each errors}} {{#each errors}}
<li>{{this.message}}</li> <li>{{this.message}}</li>
{{/each}} {{/each}}
+1 -1
View File
@@ -1,7 +1,7 @@
<p>Register a new domain</p> <p>Register a new domain</p>
{{#if errors}} {{#if errors}}
<ul> <ul id="RequestErrors">
{{#each errors}} {{#each errors}}
<li>{{this.message}}</li> <li>{{this.message}}</li>
{{/each}} {{/each}}
+1 -1
View File
@@ -1,7 +1,7 @@
<br> <br>
<div> <div>
{{#if errors}} {{#if errors}}
<ul> <ul id="RequestErrors">
{{#each errors}} {{#each errors}}
<li>{{this.message}}</li> <li>{{this.message}}</li>
{{/each}} {{/each}}