docs: fix imports across docs
This commit is contained in:
@@ -54,7 +54,7 @@ export const highlights = [
|
||||
import {
|
||||
defineMiddlewares,
|
||||
authenticate,
|
||||
} from "@medusajs/medusa"
|
||||
} from "@medusajs/framework/http"
|
||||
|
||||
export default defineMiddlewares({
|
||||
routes: [
|
||||
|
||||
@@ -192,7 +192,7 @@ export const middlewareHighlights = [
|
||||
import {
|
||||
defineMiddlewares,
|
||||
authenticate,
|
||||
} from "@medusajs/medusa"
|
||||
} from "@medusajs/framework/http"
|
||||
|
||||
export default defineMiddlewares({
|
||||
routes: [
|
||||
|
||||
@@ -128,7 +128,7 @@ To pass the `custom_name` in the `additional_data` parameter, you must add a val
|
||||
Create the file `src/api/middlewares.ts` with the following content:
|
||||
|
||||
```ts title="src/api/middlewares.ts"
|
||||
import { defineMiddlewares } from "@medusajs/medusa"
|
||||
import { defineMiddlewares } from "@medusajs/framework/http"
|
||||
import { z } from "zod"
|
||||
|
||||
export default defineMiddlewares({
|
||||
@@ -384,7 +384,7 @@ The `updateCartWorkflow` is executed by the [Update Cart API route](!api!/store#
|
||||
To allow passing `custom_name` in the `additional_data` parameter of the update cart route, add in `src/api/middlewares.ts` a new route middleware configuration object:
|
||||
|
||||
```ts title="src/api/middlewares.ts"
|
||||
import { defineMiddlewares } from "@medusajs/medusa"
|
||||
import { defineMiddlewares } from "@medusajs/framework/http"
|
||||
import { z } from "zod"
|
||||
|
||||
export default defineMiddlewares({
|
||||
|
||||
@@ -134,7 +134,7 @@ To pass the `custom_name` in the `additional_data` parameter, you must add a val
|
||||
Create the file `src/api/middlewares.ts` with the following content:
|
||||
|
||||
```ts title="src/api/middlewares.ts"
|
||||
import { defineMiddlewares } from "@medusajs/medusa"
|
||||
import { defineMiddlewares } from "@medusajs/framework/http"
|
||||
import { z } from "zod"
|
||||
|
||||
export default defineMiddlewares({
|
||||
@@ -396,7 +396,7 @@ The `updateCustomersWorkflow` is executed by the [Update Customer API route](!ap
|
||||
To allow passing `custom_name` in the `additional_data` parameter of the update customer route, add in `src/api/middlewares.ts` a new route middleware configuration object:
|
||||
|
||||
```ts title="src/api/middlewares.ts"
|
||||
import { defineMiddlewares } from "@medusajs/medusa"
|
||||
import { defineMiddlewares } from "@medusajs/framework/http"
|
||||
import { z } from "zod"
|
||||
|
||||
export default defineMiddlewares({
|
||||
|
||||
@@ -290,7 +290,7 @@ export async function POST(
|
||||
|
||||
```ts
|
||||
import { NextResponse } from "next/server"
|
||||
import { PriceListType } from "@medusajs/medusa"
|
||||
import { PriceListType } from "@medusajs/framework/utils"
|
||||
|
||||
import { initialize as initializePricingModule } from "@medusajs/medusa/pricing"
|
||||
import { PriceListType } from "@medusajs/framework/utils"
|
||||
|
||||
@@ -134,7 +134,7 @@ To pass the `custom_name` in the `additional_data` parameter, you must add a val
|
||||
Create the file `src/api/middlewares.ts` with the following content:
|
||||
|
||||
```ts title="src/api/middlewares.ts"
|
||||
import { defineMiddlewares } from "@medusajs/medusa"
|
||||
import { defineMiddlewares } from "@medusajs/framework/http"
|
||||
import { z } from "zod"
|
||||
|
||||
export default defineMiddlewares({
|
||||
@@ -402,7 +402,7 @@ The `updateProductsWorkflow` is executed by the [Update Product API route](!api!
|
||||
To allow passing `custom_name` in the `additional_data` parameter of the update product route, add in `src/api/middlewares.ts` a new route middleware configuration object:
|
||||
|
||||
```ts title="src/api/middlewares.ts"
|
||||
import { defineMiddlewares } from "@medusajs/medusa"
|
||||
import { defineMiddlewares } from "@medusajs/framework/http"
|
||||
import { z } from "zod"
|
||||
|
||||
export default defineMiddlewares({
|
||||
|
||||
@@ -134,7 +134,7 @@ To pass the `custom_name` in the `additional_data` parameter, you must add a val
|
||||
Create the file `src/api/middlewares.ts` with the following content:
|
||||
|
||||
```ts title="src/api/middlewares.ts"
|
||||
import { defineMiddlewares } from "@medusajs/medusa"
|
||||
import { defineMiddlewares } from "@medusajs/framework/http"
|
||||
import { z } from "zod"
|
||||
|
||||
export default defineMiddlewares({
|
||||
@@ -408,7 +408,7 @@ The `updatePromotionsWorkflow` is executed by the [Update Promotion API route](!
|
||||
To allow passing `custom_name` in the `additional_data` parameter of the update promotion route, add in `src/api/middlewares.ts` a new route middleware configuration object:
|
||||
|
||||
```ts title="src/api/middlewares.ts"
|
||||
import { defineMiddlewares } from "@medusajs/medusa"
|
||||
import { defineMiddlewares } from "@medusajs/framework/http"
|
||||
import { z } from "zod"
|
||||
|
||||
export default defineMiddlewares({
|
||||
|
||||
Reference in New Issue
Block a user