Skip to content

Commit

Permalink
hotfix: fix send email order(3rd)
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhhTien committed Mar 16, 2024
1 parent b69fc6c commit 304a661
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/payment/services/payment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@ export class PaymentService {
}
)
// 9. Send email/notification to customer
console.log(JSON.stringify(order))
this.mailerService.sendMail({
to: order.customer.email,
subject: `[Furnique] Đã nhận đơn hàng #${order.orderId}`,
template: 'order-created',
context: {
...order,
_id: order._id,
orderId: order.orderId,
customer: order.customer,
items: order.items.map((item) => {
Expand Down
2 changes: 2 additions & 0 deletions src/task/services/task.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ export class TaskService {
template: 'order-completed',
context: {
...order,
_id: order._id,
orderId: order.orderId,
customer: order.customer,
items: order.items.map((item) => {
const variant = item.product.variants.find((variant) => variant.sku === item.sku)
Expand Down

0 comments on commit 304a661

Please sign in to comment.