docs: update imports of middlewares and http types (#9440)

This commit is contained in:
Shahed Nasser
2024-10-03 18:56:58 +03:00
committed by GitHub
parent a461e21ae7
commit 00a51b59b1
71 changed files with 213 additions and 213 deletions

View File

@@ -23,7 +23,7 @@ export const highlights = [
import type {
MedusaRequest,
MedusaResponse,
} from "@medusajs/medusa"
} from "@medusajs/framework/http"
import myWorkflow from "../../../workflows/hello-world"
export async function GET(

View File

@@ -91,7 +91,7 @@ Finally, execute the workflow from an API route:
import type {
MedusaRequest,
MedusaResponse,
} from "@medusajs/medusa"
} from "@medusajs/framework/http"
import myWorkflow from "../../../workflows/hello-world"
export async function GET(

View File

@@ -284,7 +284,7 @@ export const highlights = [
]
```ts title="src/api/workflows/route.ts" highlights={highlights} collapsibleLines="1-11" expandButtonLabel="Show Imports"
import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
import myWorkflow from "../../../workflows/hello-world"
import {
IWorkflowEngineService,

View File

@@ -130,7 +130,7 @@ Learn how to pass `additional_data` in requests to API routes in [this chapter](
You can also pass that additional data when executing the workflow. Pass it as a parameter to the `.run` method of the workflow:
```ts title="src/workflows/hooks/product-created.ts" highlights={[["10", "additional_data"]]}
import type { MedusaRequest, MedusaResponse } from "@medusajs/medusa"
import type { MedusaRequest, MedusaResponse } from "@medusajs/framework/http"
import { createProductsWorkflow } from "@medusajs/medusa/core-flows"
export async function POST(req: MedusaRequest, res: MedusaResponse) {