diff --git a/apxtri/models/Checkjson.js b/apxtri/models/Checkjson.js index fa26e8f..fd5548b 100755 --- a/apxtri/models/Checkjson.js +++ b/apxtri/models/Checkjson.js @@ -62,7 +62,7 @@ Checkjson.schema.properties.enum = (str, enumvalues) => { } else if (tribeId) { //enumvalues is a reference of objectname.key const { tribeId, obj, keyid } = enumvalues.split("."); - return fs.existsSync(`../../../${tribeId}/schema/${obj}/itm/${keyid}.json`); + return fs.existsSync(`../${tribeId}/schema/${obj}/itm/${keyid}.json`); } else { return true; } diff --git a/apxtri/models/Nations.js b/apxtri/models/Nations.js index caf7119..95361cd 100755 --- a/apxtri/models/Nations.js +++ b/apxtri/models/Nations.js @@ -42,10 +42,10 @@ Nations.updateobjectsfromfreshesttown = (dnstownlist, objectidx) => { objlist.forEach((o) => { let objconf = { name: o, - schema: `../../schema/${o}.jsons`, + schema: `../adminapi/schema/${o}.jsons`, lastupdate: -1, }; - if (fs.existsSync(`../../${o}/conf.json`)) { + if (fs.existsSync(`../adminapi/${o}/conf.json`)) { objconf = fs.readJsonSync(`../../${o}/conf.json`); } else { fs.outputJsonSync(`../../${o}/conf.json`, objconf); diff --git a/apxtri/models/Pagans.js b/apxtri/models/Pagans.js index 17296cb..e4e9e7b 100644 --- a/apxtri/models/Pagans.js +++ b/apxtri/models/Pagans.js @@ -113,13 +113,13 @@ Pagans.keyrecovery = (emailalias, tribe, search, lg) => { **/ Pagans.getalias = (alias) => { //bypass Odmdb cause all is public save ressources - console.log(path.resolve(`../objects/pagans/itm/${alias}.json`)); - if (fs.existsSync(`../objects/pagans/itm/${alias}.json`)) { + console.log(path.resolve(`../adminapi/objects/pagans/itm/${alias}.json`)); + if (fs.existsSync(`../adminapi/objects/pagans/itm/${alias}.json`)) { return { status: 200, ref: "Pagans", msg: "aliasexist", - data: fs.readJSONSync(`../objects/pagans/itm/${alias}.json`), + data: fs.readJSONSync(`../adminapi/objects/pagans/itm/${alias}.json`), }; } else { return { @@ -200,7 +200,7 @@ Pagans.sendmailkey = (data) => { person.avecpassphrase = person.passphrase != ""; let tplfile = `../${data.tribe}/template/createidentity_${data.lg}.js`; if (!fs.existsSync(tplfile)) { - tplfile = `../template/createidentity_${data.lg}.js`; + tplfile = `..//${data.tribe}/template/createidentity_${data.lg}.js`; if (!fs.existsSync(tplfile)) { return { status: 406, diff --git a/apxtri/models/Wwws.js b/apxtri/models/Wwws.js index d01dc88..f7a857b 100644 --- a/apxtri/models/Wwws.js +++ b/apxtri/models/Wwws.js @@ -71,7 +71,7 @@ Wwws.initlocaldata = (tribe, appname, pagename, version, profils, lg) => { // A faire plus tard charger tous les referentiele et les data pour une page adminpage /* if (pagename=="pageadmin"){ // load any referentialdata - glob.Sync(`../../${tribe}/objects/*.json`).forEach(f=>{ + glob.Sync(`../${tribe}/objects/*.json`).forEach(f=>{ if (!localstorage.schema.includes(`${tribe}/objects/${path.basename(f,".json")}`)){ localstorage.schema.push(`${tribe}/objects/${path.basename(f,".json")}`) }