🐞 fix: change url validation to require scheme and allow path
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user