fix(slack): show discount code flag

This commit is contained in:
Sebastian Rindom committed 2021-03-23 11:27:56 +01:00
1 parent 1b00f967de
commit b5bf650ec2
1 file changed
+4
@@ -6,6 +6,8 @@ class SlackService extends BaseService {
/**
* @param {Object} options - options defined in `medusa-config.js`
* {
* show_discount_code: If set to true the discount code used will be
* displayed in the order channel.
* slack_url: "https://hooks.slack.com/services/...",
* admin_orders_url: "https:..../orders"
* }
@@ -119,6 +121,7 @@ class SlackService extends BaseService {
})
}
if (this.options_.show_discount_code) {
order.discounts.forEach((d) => {
blocks.push({
type: "section",
@@ -130,6 +133,7 @@ class SlackService extends BaseService {
},
})
})
}
blocks.push({
type: "divider",