Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
chore: add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon authored Nov 24, 2023
1 parent e30af21 commit 856d400
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions back-strapi/api/commande/controllers/commande.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,15 @@ module.exports = {
};
if (ctx.request.body.email) {
strapi.log.info(
"SENDING EMAIL TO : ",
"SENDING EMAIL REF1 TO : ",
entity.email,
" - ORDER NUMBER ",
entity.id
);

if (!referent.openingHours) referent.openingHours = {};
try {
await strapi.plugins["email"].services.email.sendTemplatedEmail(
const sendResult = await strapi.plugins["email"].services.email.sendTemplatedEmail(
{
to: entity.email,
},
Expand All @@ -448,6 +448,8 @@ module.exports = {
referent: Object.assign(_.pick(referent, ["openingHours"])),
}
);
console.log(sendResult);
console.log(JSON.stringify(sendResult,null,2));
} catch(e) {
console.error("Email referent error", e);
}
Expand Down

0 comments on commit 856d400

Please sign in to comment.