docs: fix module definition for providers (#8180)

This commit is contained in:
Shahed Nasser
2024-07-18 18:59:53 +02:00
committed by GitHub
parent 535832b692
commit 71ebcd1bd0
4 changed files with 16 additions and 20 deletions
@@ -39,14 +39,13 @@ Create the file \`src/modules/my-auth/index.ts\` with the following content:
\`\`\`ts title="src/modules/my-auth/index.ts"
import MyAuthProviderService from "./service"
import { Module } from "@medusajs/utils"
export default Module("my-auth", {
service: MyAuthProviderService,
})
export default {
services: [MyAuthProviderService],
}
\`\`\`
This exports the module's definition, indicating that the \`MyAuthProviderService\` is the main service of the module.`,
This exports the module's definition, indicating that the \`MyAuthProviderService\` is the module's service.`,
`## 4. Use Module
To use your Auth Provider Module, add it to the \`providers\` array of the Auth Module:
@@ -39,14 +39,13 @@ Create the file \`src/modules/my-file/index.ts\` with the following content:
\`\`\`ts title="src/modules/my-file/index.ts"
import MyFileProviderService from "./service"
import { Module } from "@medusajs/utils"
export default Module("my-file", {
service: MyFileProviderService,
})
export default {
services: [MyFileProviderService],
}
\`\`\`
This exports the module's definition, indicating that the \`MyFileProviderService\` is the main service of the module.`,
This exports the module's definition, indicating that the \`MyFileProviderService\` is the module's service.`,
`## 4. Use Module
To use your File Provider Module, add it to the \`providers\` array of the File Module:
@@ -39,14 +39,13 @@ Create the file \`src/modules/my-fulfillment/index.ts\` with the following conte
\`\`\`ts title="src/modules/my-fulfillment/index.ts"
import MyFulfillmentProviderService from "./service"
import { Module } from "@medusajs/utils"
export default Module("my-fulfillment", {
service: MyFulfillmentProviderService,
})
export default {
services: [MyFulfillmentProviderService],
}
\`\`\`
This exports the module's definition, indicating that the \`MyFulfillmentProviderService\` is the main service of the module.`,
This exports the module's definition, indicating that the \`MyFulfillmentProviderService\` is the module's service.`,
`## 4. Use Module
To use your Fulfillment Provider Module, add it to the \`providers\` array of the Fulfillment Module:
@@ -43,14 +43,13 @@ Create the file \`src/modules/my-notification/index.ts\` with the following cont
\`\`\`ts title="src/modules/my-notification/index.ts"
import MyNotificationProviderService from "./service"
import { Module } from "@medusajs/utils"
export default Module("my-notification", {
service: MyNotificationProviderService,
})
export default {
services: [MyNotificationProviderService],
}
\`\`\`
This exports the module's definition, indicating that the \`MyNotificationProviderService\` is the main service of the module.`,
This exports the module's definition, indicating that the \`MyNotificationProviderService\` is the module's service.`,
`## 4. Use Module
To use your Notification Provider Module, add it to the \`providers\` array of the Notification Module: