chore(link-modules): keep promotion alias (#12928)
* chore(link-modules): keep promotion alias * chore: change promotion to promotions
This commit is contained in:
5
.changeset/grumpy-comics-own.md
Normal file
5
.changeset/grumpy-comics-own.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/link-modules": patch
|
||||
---
|
||||
|
||||
chore(link-modules): keep promotion alias
|
||||
@@ -36,7 +36,7 @@ const DEFAULT_RELATIONS = [
|
||||
"*shipping_address",
|
||||
"*billing_address",
|
||||
"*sales_channel",
|
||||
"*promotion",
|
||||
"*promotions",
|
||||
"*shipping_methods",
|
||||
"*credit_lines",
|
||||
"*fulfillments",
|
||||
|
||||
@@ -48,6 +48,13 @@ export const OrderPromotion: ModuleJoinerConfig = {
|
||||
path: "promotion_link.promotions",
|
||||
isList: true,
|
||||
},
|
||||
/**
|
||||
* @deprecated use the promotions field alias instead
|
||||
*/
|
||||
promotion: {
|
||||
path: "promotion_link.promotions",
|
||||
isList: true,
|
||||
},
|
||||
},
|
||||
relationship: {
|
||||
serviceName: LINKS.OrderPromotion,
|
||||
@@ -57,5 +64,15 @@ export const OrderPromotion: ModuleJoinerConfig = {
|
||||
isList: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
serviceName: Modules.PROMOTION,
|
||||
entity: "Promotion",
|
||||
relationship: {
|
||||
serviceName: LINKS.OrderPromotion,
|
||||
primaryKey: "promotion_id",
|
||||
foreignKey: "id",
|
||||
alias: "order_link",
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user