Changed .add to .create

This commit is contained in:
2024-07-31 20:02:51 -04:00
parent 75a486251d
commit fb9a19d5f0
10 changed files with 21 additions and 137 deletions
+4 -4
View File
@@ -48,7 +48,7 @@ class Host extends Table{
console.log('addCache, corrent parent?', parentOBJ.wildcard_parent || parentOBJ.host)
console.log('addCache, got parent', parentOBJ)
await this.add({
await this.create({
...parentOBJ,
host: host,
is_cache: true,
@@ -56,7 +56,7 @@ class Host extends Table{
wildcard_parent: parentOBJ.host
}, true);
await Cached.add({
await Cached.create({
host: host,
parent: parentOBJ.host
});
@@ -86,7 +86,7 @@ class Host extends Table{
static async add(data, ...args){
try{
let out = await super.add(data, ...args)
let out = await super.create(data, ...args)
await this.buildLookUpObj()
if(out.is_wildcard) await out.createWildcardCert()
@@ -272,7 +272,7 @@ module.exports = {Host: ModelPs(Host)};
try{
await Host.lookUpReady();
// let res = await Host.add({
// let res = await Host.create({
// host: '*.test.holycore.quest',
// ip: '192.168.1.47',
// 'created_by': 'william',