docs: typos and examples fixes (#11954)
* docs: typos and examples fixes * fix notification example
This commit is contained in:
@@ -45,7 +45,7 @@ The `moduleIntegrationTestRunner` function accepts as a parameter an object with
|
||||
|
||||
- `moduleName`: The name of the module.
|
||||
- `moduleModels`: An array of models in the module. Refer to [this section](#write-tests-for-modules-without-data-models) if your module doesn't have data models.
|
||||
- `resolve`: The path to the model.
|
||||
- `resolve`: The path to the module's directory.
|
||||
- `testSuite`: A function that defines the tests to run.
|
||||
|
||||
The `testSuite` function accepts as a parameter an object having the `service` property, which is an instance of the module's main service.
|
||||
|
||||
@@ -8,7 +8,7 @@ In this chapter, you'll learn how to use environment variables in your admin cus
|
||||
|
||||
<Note>
|
||||
|
||||
To learn how envirnment variables are generally loaded in Medusa based on your application's environment, check out [this chapter](../../environment-variables/page.mdx).
|
||||
To learn how environment variables are generally loaded in Medusa based on your application's environment, check out [this chapter](../../environment-variables/page.mdx).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ In this chapter, you’ll learn about middlewares and how to create them.
|
||||
|
||||
A middleware is a function executed when a request is sent to an API Route. It's executed before the route handler function.
|
||||
|
||||
Middlwares are used to guard API routes, parse request content types other than `application/json`, manipulate request data, and more.
|
||||
Middlewares are used to guard API routes, parse request content types other than `application/json`, manipulate request data, and more.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ For example, if you omit the `a` parameter, you'll receive a `400` response code
|
||||
|
||||
---
|
||||
|
||||
## How to Validate Request Query Paramters
|
||||
## How to Validate Request Query Parameters
|
||||
|
||||
The steps to validate the request query parameters are the similar to that of [validating the body](#how-to-validate-request-body).
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ You can also write migrations manually. To do that, create a file in the `migrat
|
||||
|
||||
For example:
|
||||
|
||||
```ts title="src/modules/blog/migrations/Migration20240429.ts"
|
||||
```ts title="src/modules/blog/migrations/Migration202507021059.ts"
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration202507021059 extends Migration {
|
||||
|
||||
@@ -545,7 +545,7 @@ The middleware transforms these parameters to configurations that you can pass t
|
||||
|
||||
<Note>
|
||||
|
||||
As of [Medusa v2.2.0](https://github.com/medusajs/medusa/releases/tag/v2.2.0), `remoteQueryConfig` has been depercated in favor of `queryConfig`. Their usage is still the same, only the property name has changed.
|
||||
As of [Medusa v2.2.0](https://github.com/medusajs/medusa/releases/tag/v2.2.0), `remoteQueryConfig` has been deprecated in favor of `queryConfig`. Their usage is still the same, only the property name has changed.
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ export default async function helloWorldLoader({
|
||||
}: LoaderOptions) {
|
||||
const logger = container.resolve("logger")
|
||||
|
||||
logger.info("[helloWorldLoader]: Hello, World!")
|
||||
logger.info("[HELLO MODULE] Just started the Medusa application!")
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ const myWorkflow = createWorkflow(
|
||||
attachProductToSalesChannelStep(product)
|
||||
)
|
||||
|
||||
const id = product.id
|
||||
const refetchedProduct = getProductStep(product.id)
|
||||
|
||||
return new WorkflowResponse(refetchedProduct)
|
||||
|
||||
Reference in New Issue
Block a user