🐞 fix: change url validation to require scheme and allow path

This commit is contained in:
Keith Solomon
2025-05-29 07:15:29 -05:00
parent de88a320d7
commit c6070dffeb
4 changed files with 8 additions and 1369 deletions

View File

@@ -12,7 +12,6 @@ class SiteModel {
/**
* Inserts a new site into the database.
*
* @param {string} name - The name of the site.
* @param {string} domainName - The domain name of the site.
*
* @returns {Promise<Object>} - The result of the insert operation.
@@ -20,7 +19,7 @@ class SiteModel {
async insert(domainName) {
// validate inputs
if (!domainName) {
throw new Error('Name and domain name are required to insert a site.');
throw new Error('Domain name is required to insert a site.');
}
// validate domain name format