fix: Standardize remaining batch methods and update FE calls (#7122)

This commit is contained in:
Stevche Radevski authored and GitHub committed 2024-04-23 09:12:38 +00:00
1 parent ea14a3bd68
commit 9e3556686b
49 files changed
+851 -611

No files matched your search

+9 -1
View File
@@ -1,11 +1,12 @@
import { Modules } from "@medusajs/modules-sdk"
import { ModuleJoinerConfig } from "@medusajs/types"
import { generateLinkableKeysMap } from "@medusajs/utils"
import { Campaign, Promotion } from "@models"
import { Campaign, Promotion, PromotionRule } from "@models"
export const LinkableKeys = {
promotion_id: Promotion.name,
campaign_id: Campaign.name,
promotion_rule_id: PromotionRule.name,
}
export const entityNameToLinkableKeysMap = generateLinkableKeysMap(LinkableKeys)
@@ -28,5 +29,12 @@ export const joinerConfig: ModuleJoinerConfig = {
methodSuffix: "Campaigns",
},
},
{
name: ["promotion_rule", "promotion_rules"],
args: {
entity: PromotionRule.name,
methodSuffix: "PromotionRules",
},
},
],
}