fix(medusa): Add module config to transaction base service (#3033)
This commit is contained in:
1 parent
93d0dc1bdc
commit
1547dd8143
4 files changed
+41
-30
No files matched your search
@@ -1,30 +1,30 @@
|
||||
import { MedusaError } from "medusa-core-utils"
|
||||
import {
|
||||
FindConfig,
|
||||
IInventoryService,
|
||||
FilterableInventoryItemProps,
|
||||
FilterableReservationItemProps,
|
||||
ConfigurableModuleDeclaration,
|
||||
CreateInventoryItemInput,
|
||||
CreateReservationItemInput,
|
||||
FilterableInventoryLevelProps,
|
||||
CreateInventoryLevelInput,
|
||||
CreateReservationItemInput,
|
||||
FilterableInventoryItemProps,
|
||||
FilterableInventoryLevelProps,
|
||||
FilterableReservationItemProps,
|
||||
FindConfig,
|
||||
IEventBusService,
|
||||
IInventoryService,
|
||||
InventoryItemDTO,
|
||||
InventoryLevelDTO,
|
||||
MODULE_RESOURCE_TYPE,
|
||||
ReservationItemDTO,
|
||||
TransactionBaseService,
|
||||
UpdateInventoryLevelInput,
|
||||
UpdateReservationItemInput,
|
||||
IEventBusService,
|
||||
InventoryItemDTO,
|
||||
ReservationItemDTO,
|
||||
InventoryLevelDTO,
|
||||
TransactionBaseService,
|
||||
ConfigurableModuleDeclaration,
|
||||
MODULE_RESOURCE_TYPE,
|
||||
} from "@medusajs/medusa"
|
||||
import { MedusaError } from "medusa-core-utils"
|
||||
|
||||
import { EntityManager } from "typeorm"
|
||||
import {
|
||||
InventoryItemService,
|
||||
ReservationItemService,
|
||||
InventoryLevelService,
|
||||
ReservationItemService,
|
||||
} from "./"
|
||||
import { EntityManager } from "typeorm"
|
||||
|
||||
type InjectedDependencies = {
|
||||
manager: EntityManager
|
||||
@@ -47,7 +47,8 @@ export default class InventoryService
|
||||
options?: unknown,
|
||||
moduleDeclaration?: ConfigurableModuleDeclaration
|
||||
) {
|
||||
super(arguments[0])
|
||||
// @ts-ignore
|
||||
super(...arguments)
|
||||
|
||||
if (moduleDeclaration?.resources !== MODULE_RESOURCE_TYPE.SHARED) {
|
||||
throw new MedusaError(
|
||||
|
||||
Reference in new issue
Block a user