modif notification await

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

@ -84,15 +84,23 @@ router.post(
let sendret;
if (req.body.emailsto && req.body.emailsto.length > 0) {
const sendcampain = await Notifications.manageemail(
req.body.emailsto,
req.body,
req.params.template,
req.params.tribe,
req.session.header.xlang,
1
);
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
/*
const campain = {
emailsto: [
{
@ -111,8 +119,9 @@ router.post(
req.session.header.xlang,
1
);
*/
}
console.log(sendret)
console.log(sendret);
res.status(sendret.status).send(sendret);
}
);