docs: fix imports across docs
This commit is contained in:
1 parent
8dedb97e40
commit
f4b45b8080
21 files changed
+61
-61
No files matched your search
@@ -704,10 +704,10 @@ This defines the expected request body schema.
|
||||
Finally, create the file `src/api/middlewares.ts` with the following content:
|
||||
|
||||
```ts title="src/api/middlewares.ts"
|
||||
import { defineMiddlewares } from "@medusajs/medusa"
|
||||
import {
|
||||
defineMiddlewares,
|
||||
validateAndTransformBody,
|
||||
} from "@medusajs/framework"
|
||||
} from "@medusajs/framework/http"
|
||||
import { createDigitalProductsSchema } from "./validation-schemas"
|
||||
|
||||
export default defineMiddlewares({
|
||||
|
||||
@@ -345,7 +345,7 @@ For example, suppose an administrator changes the product data in the ERP system
|
||||
Then, 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 { raw } from "body-parser"
|
||||
|
||||
export default defineMiddlewares({
|
||||
|
||||
@@ -967,7 +967,7 @@ Create the file `src/api/middlewares.ts` with the following content:
|
||||
import {
|
||||
authenticate,
|
||||
defineMiddlewares,
|
||||
} from "@medusajs/medusa"
|
||||
} from "@medusajs/framework/http"
|
||||
|
||||
export default defineMiddlewares({
|
||||
routes: [
|
||||
@@ -2646,7 +2646,7 @@ Then, create the file `src/api/deliveries/[id]/middlewares.ts` with the followin
|
||||
import {
|
||||
authenticate,
|
||||
defineMiddlewares,
|
||||
} from "@medusajs/medusa"
|
||||
} from "@medusajs/framework/http"
|
||||
import { isDeliveryRestaurant } from "../../utils/is-delivery-restaurant"
|
||||
|
||||
export default defineMiddlewares({
|
||||
|
||||
@@ -468,7 +468,7 @@ Next, create the file `src/api/middlewares.ts` with the following content:
|
||||
import {
|
||||
defineMiddlewares,
|
||||
authenticate,
|
||||
} from "@medusajs/medusa"
|
||||
} from "@medusajs/framework/http"
|
||||
|
||||
export default defineMiddlewares({
|
||||
routes: [
|
||||
@@ -723,10 +723,8 @@ Finally, in `src/api/middlewares.ts`, apply a middleware on the create products
|
||||
import {
|
||||
defineMiddlewares,
|
||||
authenticate,
|
||||
} from "@medusajs/medusa"
|
||||
import {
|
||||
validateAndTransformBody,
|
||||
} from "@medusajs/framework/utils"
|
||||
} from "@medusajs/framework/http"
|
||||
import {
|
||||
AdminCreateProduct,
|
||||
} from "@medusajs/medusa/api/admin/products/validators"
|
||||
|
||||
Reference in new issue
Block a user