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

fix: add debug #489

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 28 additions & 24 deletions back-strapi/api/commande/controllers/commande.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,30 +355,34 @@ module.exports = {
" - ORDER NUMBER ",
entity.id
);
await strapi.plugins["email"].services.email.sendTemplatedEmail(
{
to: entity.email,
},
EMAIL_ORDER_CONFIRM,
{
order: Object.assign(
_.pick(entity, [
"name",
"first_name",
"last_name",
"id",
"address",
"address_zipcode",
"address_city",
]),
{
delivery_name: delivery_name,
custom_text: custom_text,
box: _.pick(box, ["title"]),
}
),
}
);
try {
await strapi.plugins["email"].services.email.sendTemplatedEmail(
{
to: entity.email,
},
EMAIL_ORDER_CONFIRM,
{
order: Object.assign(
_.pick(entity, [
"name",
"first_name",
"last_name",
"id",
"address",
"address_zipcode",
"address_city",
]),
{
delivery_name: delivery_name,
custom_text: custom_text,
box: _.pick(box, ["title"]),
}
),
}
);
} catch(e) {
console.error("EMAIL ERR", e);
}
}
} else {
const referent_text = await fs.promises.readFile(
Expand Down
Loading