www to manage web src getwco

This commit is contained in:
2025-06-03 07:42:21 +02:00
parent 1ea0179b2e
commit fac630d956

View File

@@ -98,7 +98,8 @@ Wwws.getwco = (wconame, ctx) => {
const webpage = fs.existsSync(webconf) const webpage = fs.existsSync(webconf)
? fs.readJSONSync(webconf) ? fs.readJSONSync(webconf)
: webpageinit; : webpageinit;
if (!webpage.pages[ctx.pagename])webpage.pages[ctx.pagename]=webpageinit.pages[ctx.pagename]; if (!webpage.pages[ctx.pagename])
webpage.pages[ctx.pagename] = webpageinit.pages[ctx.pagename];
// check that webconf for tailwindcsscontent property exist for this wco request // check that webconf for tailwindcsscontent property exist for this wco request
const pathtocheckfortw = [ const pathtocheckfortw = [
`../../../../../../../adminapi/objects/wco/${wconame}/*.{html,js,mustache}`, `../../../../../../../adminapi/objects/wco/${wconame}/*.{html,js,mustache}`,
@@ -181,7 +182,7 @@ Wwws.getwco = (wconame, ctx) => {
}); });
}); });
} }
console.log(webpage.pages[ctx.pagename]) console.log(webpage.pages[ctx.pagename]);
// check if referential are there for this wco // check if referential are there for this wco
if (wcoinfo.ref && Object.keys(wcoinfo.ref).length > 0) { if (wcoinfo.ref && Object.keys(wcoinfo.ref).length > 0) {
Object.keys(wcoinfo.ref).forEach((t) => { Object.keys(wcoinfo.ref).forEach((t) => {