From 563ed001c07d0ce0c235c1fac3e431a0066682d6 Mon Sep 17 00:00:00 2001 From: philc Date: Tue, 11 Mar 2025 07:48:04 +0100 Subject: [PATCH] modif notification await --- apxtri/routes/notifications.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/apxtri/routes/notifications.js b/apxtri/routes/notifications.js index 15db4b7..a81a4e0 100644 --- a/apxtri/routes/notifications.js +++ b/apxtri/routes/notifications.js @@ -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); } );