limit number of recovery email at 3
This commit is contained in:
@@ -101,11 +101,15 @@ Pagans.keyrecovery = (emailalias, tribe, search, lg) => {
|
||||
if (person.recoveryauth) emaillist.push({ alias: search, tribe, lg });
|
||||
}
|
||||
}
|
||||
console.log(emaillist)
|
||||
emaillist.forEach((e) => {
|
||||
//console.log(emaillist)
|
||||
// Change to avoid sending too much email mainly for tester
|
||||
/* emaillist.forEach((e) => {
|
||||
const ret = Pagans.sendmailkey(e);
|
||||
});
|
||||
|
||||
});*/
|
||||
for (let i = 0; i < emaillist.length && i < 3; i++) {
|
||||
const e = emaillist[i];
|
||||
const ret = Pagans.sendmailkey(e);
|
||||
}
|
||||
if (emaillist.length > 0) {
|
||||
return {
|
||||
status: 200,
|
||||
|
@@ -98,6 +98,7 @@ Wwws.getwco = (wconame, ctx) => {
|
||||
const webpage = fs.existsSync(webconf)
|
||||
? fs.readJSONSync(webconf)
|
||||
: webpageinit;
|
||||
if (!webpage.pages[ctx.pagename])webpage.pages[ctx.pagename]=webpageinit.pages[ctx.pagename];
|
||||
// check that webconf for tailwindcsscontent property exist for this wco request
|
||||
const pathtocheckfortw = [
|
||||
`../../../../../../../adminapi/objects/wco/${wconame}/*.{html,js,mustache}`,
|
||||
@@ -180,10 +181,13 @@ Wwws.getwco = (wconame, ctx) => {
|
||||
});
|
||||
});
|
||||
}
|
||||
console.log(webpage.pages[ctx.pagename])
|
||||
// check if referential are there for this wco
|
||||
if (wcoinfo.ref && Object.keys(wcoinfo.ref).length > 0) {
|
||||
Object.keys(wcoinfo.ref).forEach((t) => {
|
||||
t = t.replace("{{tribe}}", ctx.tribe);
|
||||
if (!webpage.pages[ctx.pagename].ref)
|
||||
webpage.pages[ctx.pagename].ref = {};
|
||||
if (!Object.keys(webpage.pages[ctx.pagename].ref).includes(t)) {
|
||||
webpage.pages[ctx.pagename].ref[t] = wcoinfo.ref[t];
|
||||
}
|
||||
@@ -202,11 +206,15 @@ Wwws.getwco = (wconame, ctx) => {
|
||||
// save the conf for update localdb when the web page request it
|
||||
fs.outputJSONSync(webconf, webpage, { spaces: 2 });
|
||||
// create a text file with component to watch for tailwind
|
||||
let sourcetw=""
|
||||
webpage.tailwindcsscontent.forEach(s=>{
|
||||
sourcetw+=`@source "${s}";\n`
|
||||
})
|
||||
fs.outputFileSync(`../${ctx.tribe}/objects/wwws/${ctx.xapp}/src/static/css/sourcetw.css`,sourcetw,"utf-8");
|
||||
let sourcetw = "";
|
||||
webpage.tailwindcsscontent.forEach((s) => {
|
||||
sourcetw += `@source "${s}";\n`;
|
||||
});
|
||||
fs.outputFileSync(
|
||||
`../${ctx.tribe}/objects/wwws/${ctx.xapp}/src/static/css/sourcetw.css`,
|
||||
sourcetw,
|
||||
"utf-8"
|
||||
);
|
||||
return {
|
||||
status: 200,
|
||||
ref: "Wwws",
|
||||
|
@@ -55,13 +55,13 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@tailwindcss/cli": "^4.1.4",
|
||||
"@tailwindcss/cli": "^4.1.6",
|
||||
"apidoc": "^1.2.0",
|
||||
"async": "^3.2.0",
|
||||
"axios": "^1.7.8",
|
||||
"bcrypt": "^5.0.0",
|
||||
"cors": "^2.8.4",
|
||||
"daisyui": "^5.0.28",
|
||||
"daisyui": "^5.0.35",
|
||||
"dayjs": "^1.11.13",
|
||||
"dns-sync": "^0.2.1",
|
||||
"express": "^4.21.1",
|
||||
@@ -81,10 +81,11 @@
|
||||
"sharp": "^0.33.5",
|
||||
"smtp-client": "^0.4.0",
|
||||
"stripe": "^17.3.1",
|
||||
"tailwindcss": "^4.1.4",
|
||||
"tailwindcss": "^4.1.6",
|
||||
"uuid": "^11.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-env": "^7.0.3"
|
||||
}
|
||||
},
|
||||
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538"
|
||||
}
|
||||
|
Reference in New Issue
Block a user