chore(): Reorganize modules (#7210)
**What** Move all modules to the modules directory
This commit is contained in:
committed by
GitHub
parent
7a351eef09
commit
4eae25e1ef
@@ -0,0 +1,24 @@
|
||||
import {
|
||||
JoinerRelationship,
|
||||
ModuleExports,
|
||||
ModuleJoinerConfig,
|
||||
} from "@medusajs/types"
|
||||
import { getModuleService, getReadOnlyModuleService } from "@services"
|
||||
import { getLoaders } from "../loaders"
|
||||
|
||||
export function getLinkModuleDefinition(
|
||||
joinerConfig: ModuleJoinerConfig,
|
||||
primary: JoinerRelationship,
|
||||
foreign: JoinerRelationship
|
||||
): ModuleExports {
|
||||
return {
|
||||
service: joinerConfig.isReadOnlyLink
|
||||
? getReadOnlyModuleService(joinerConfig)
|
||||
: getModuleService(joinerConfig),
|
||||
loaders: getLoaders({
|
||||
joinerConfig,
|
||||
primary,
|
||||
foreign,
|
||||
}),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user