Remove name from insert method - this is removed from db schema

This commit is contained in:
Aarish
2025-05-25 17:06:37 -05:00
parent b9967a8e66
commit f28328dcc4
2 changed files with 26 additions and 4 deletions

View File

@@ -17,9 +17,9 @@ class SiteModel {
*
* @returns {Promise<Object>} - The result of the insert operation.
*/
async insert(name, domainName) {
async insert(domainName) {
// validate inputs
if (!name || !domainName) {
if (!domainName) {
throw new Error('Name and domain name are required to insert a site.');
}
@@ -34,7 +34,6 @@ class SiteModel {
}
const { data, error } = await supabase.from(SiteModel.tableName).insert({
name: name,
domain_name: domainName,
}).select();