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!="")
|
person.avecpassphrase=(person.passphrase!="")
|
||||||
console.log("person:", person);
|
console.log("person:", person);
|
||||||
|
|
||||||
|
console.log(path.resolve(`../../${data.tribe}/template/createidentity_${data.lg}.js`))
|
||||||
let tplfile=`../../../${data.tribe}/template/createidentity_${data.lg}.js`;
|
let tplfile=`../../${data.tribe}/template/createidentity_${data.lg}.js`;
|
||||||
if (!fs.existsSync(tplfile)){
|
if (!fs.existsSync(tplfile)){
|
||||||
tplfile=`../../adminapi/template/createidentity_${data.lg}.js`;
|
tplfile=`../template/createidentity_${data.lg}.js`;
|
||||||
if (!fs.existsSync(tplfile)){
|
if (!fs.existsSync(tplfile)){
|
||||||
return {
|
return {
|
||||||
status:406,
|
status:406,
|
||||||
@ -138,7 +138,7 @@ Pagans.sendmailkey = (data) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const tplemail = require(tplfile)
|
const tplemail = require(path.resolve(tplfile))
|
||||||
|
|
||||||
const maildata = {
|
const maildata = {
|
||||||
to: person.email,
|
to: person.email,
|
||||||
|
@ -137,7 +137,8 @@ router.post("/", checkHeaders, isAuthenticated, async (req, res) => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const objpagan = { alias: req.body.alias, publickey: req.body.publickey };
|
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}};
|
const createprocess={status:200, ref:"Pagans", msg:"successfulcreate",data:{alias:req.body.alias}};
|
||||||
if (newpagan.status == 200) {
|
if (newpagan.status == 200) {
|
||||||
if (req.body.email) {
|
if (req.body.email) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user