docs: general improvements and additions (#12296)

This commit is contained in:
Shahed Nasser
2025-04-25 19:00:45 +03:00
committed by GitHub
parent e2a7dbb61b
commit 43d282da8b
32 changed files with 17403 additions and 16544 deletions
@@ -60,7 +60,7 @@ export const highlights = [
]
```ts title="src/api/middlewares.ts" highlights={highlights}
import { defineMiddlewares } from "@medusajs/medusa";
import { defineMiddlewares } from "@medusajs/medusa"
export default defineMiddlewares({
routes: [
@@ -69,13 +69,13 @@ export default defineMiddlewares({
method: "GET",
middlewares: [
(req, res, next) => {
req.allowed?.push("b2b_company");
next();
req.allowed?.push("b2b_company")
next()
},
],
},
],
});
})
```
In this example, you apply a middleware to the [Get Customer Admin API Route](!api!/admin#customers_getcustomersid).