modif notification await

This commit is contained in:
philc 2025-03-11 07:48:04 +01:00
parent 5088f60108
commit 563ed001c0

View File

@ -84,15 +84,23 @@ router.post(
let sendret; let sendret;
if (req.body.emailsto && req.body.emailsto.length > 0) { if (req.body.emailsto && req.body.emailsto.length > 0) {
const sendcampain = await Notifications.manageemail( const sendcampain = await Notifications.manageemail(
req.body.emailsto, req.body,
req.params.template, req.params.template,
req.params.tribe, req.params.tribe,
req.session.header.xlang, req.session.header.xlang,
1 1
); );
sendret = sendcampain; sendret = sendcampain;
} else if (req.body.emails) { } else {
sendret = {
status: 406,
ref: "Notifications",
msg: "bodymisformat",
data: { body: req.body }
};
// To delete when Bhavesh removed direct email requesting registration // To delete when Bhavesh removed direct email requesting registration
/*
const campain = { const campain = {
emailsto: [ emailsto: [
{ {
@ -111,8 +119,9 @@ router.post(
req.session.header.xlang, req.session.header.xlang,
1 1
); );
*/
} }
console.log(sendret) console.log(sendret);
res.status(sendret.status).send(sendret); res.status(sendret.status).send(sendret);
} }
); );