From 57db217ee4c4003a10d8345054d9989d709e0246 Mon Sep 17 00:00:00 2001 From: philc Date: Tue, 6 Aug 2024 07:34:25 +0200 Subject: [PATCH] modif cc in notification and Wwws change --- models/Notifications.js | 2 ++ models/Wwws.js | 9 +++++++++ routes/wwws.js | 8 ++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/models/Notifications.js b/models/Notifications.js index d60ae40..a0fd426 100644 --- a/models/Notifications.js +++ b/models/Notifications.js @@ -243,12 +243,14 @@ Notifications.manageemail = (data, template, tribe) => { dat.text = Mustache.render(tplemail.text, data); dat.Cc=tplemail.Cc dat.Bcc=tplemail.Bcc + /* @TODO issue with data.Cc need to test if (data.Cc){ dat.Cc+=","+data.Cc.join(',') } if (data.Bcc){ dat.Bcc+=","+data.Bcc.join(',') } + */ if (data.attachments){ data.attachments.forEach(a=>tplemail.attachments.push(a)) } diff --git a/models/Wwws.js b/models/Wwws.js index 3170027..e20179a 100644 --- a/models/Wwws.js +++ b/models/Wwws.js @@ -7,6 +7,15 @@ const Odmdb = require("./Odmdb.js"); const conf = require(`../../../conf.json`); const Wwws = {}; +Wwws.initlocalwco=(tribwco,profils,lg)=>{ + const wco={} + Object.keys(tribwco).forEach(t=>{ + if (!fs.existsSync(`../../../${tribwco}`)){} + + }) +} + + Wwws.initlocaldata = (tribe, appname, pagename, version, profils, lg) => { const fileparam = `../../${tribe}/objects/wwws/itm/${appname}.json`; console.log(fileparam); diff --git a/routes/wwws.js b/routes/wwws.js index d4d0589..1526e22 100644 --- a/routes/wwws.js +++ b/routes/wwws.js @@ -28,12 +28,12 @@ router.post( ); /** - * @api {put} /adminapi/wwws/updatelocalwcoanonymous - Get local web component for app anonymous only + * @api {put} /adminapi/wwws/webcomponents - Get local web components * @apiGroup Wwws - * @apiName getappcontextforanonymous - * @apiDescription Get web component from backend to localstorage for anonymous + * @apiName getwco + * @apiDescription Get web component from backend to localstorage for development. This is anonymous but must be authenticated with accessright to other tribe to get their web component.
For production it will generate a unique id that store to add in updatelocaldb with in production space /js/uniqueid.js css/uniqueid.css pagename.html with link in it * - * @apiBody {object} tribelistwco {tribe:[wconame]} + * @apiBody {object} tribelistwco { wco:{tribe:[wconame]}, mode:"dev"|"prod"} */ router.put( "/updatelocalwcoanonymous",