1
0
forked from apxtri/apxtri

modif tpl

This commit is contained in:
philc 2024-03-21 17:47:57 +01:00
parent 8033602923
commit cc0c9e7f5e
2 changed files with 6 additions and 5 deletions

View File

@ -125,10 +125,10 @@ Pagans.sendmailkey = (data) => {
person.avecpassphrase=(person.passphrase!="")
console.log("person:", person);
let tplfile=`../../../${data.tribe}/template/createidentity_${data.lg}.js`;
console.log(path.resolve(`../../${data.tribe}/template/createidentity_${data.lg}.js`))
let tplfile=`../../${data.tribe}/template/createidentity_${data.lg}.js`;
if (!fs.existsSync(tplfile)){
tplfile=`../../adminapi/template/createidentity_${data.lg}.js`;
tplfile=`../template/createidentity_${data.lg}.js`;
if (!fs.existsSync(tplfile)){
return {
status:406,
@ -138,7 +138,7 @@ Pagans.sendmailkey = (data) => {
}
}
}
const tplemail = require(tplfile)
const tplemail = require(path.resolve(tplfile))
const maildata = {
to: person.email,

View File

@ -137,7 +137,8 @@ router.post("/", checkHeaders, isAuthenticated, async (req, res) => {
return
}
const objpagan = { alias: req.body.alias, publickey: req.body.publickey };
const newpagan = Odmdb.cud(`../../objects/pagans`, "C", objpagan, role);
console.log(path.resolve(`../objects/pagans`))
const newpagan = Odmdb.cud(`../objects/pagans`, "C", objpagan, role);
const createprocess={status:200, ref:"Pagans", msg:"successfulcreate",data:{alias:req.body.alias}};
if (newpagan.status == 200) {
if (req.body.email) {