forked from apxtri/apxtri
modif tpl
This commit is contained in:
parent
8033602923
commit
cc0c9e7f5e
@ -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,
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user