docs: add new API route guides + fixes and improvements to existing ones (#8987)

- Add new documentation pages for API route intro, responses, errors, and validation
- General fixes and improvements across existing API route guides

> Note: I didn't work on the guide for additional data validation. Will work on this as part of my next focus on workflows.
This commit is contained in:
Shahed Nasser
2024-09-04 18:23:55 +00:00
committed by GitHub
parent ee3580efdb
commit 1d54e8fdc1
11 changed files with 787 additions and 166 deletions
@@ -20,7 +20,7 @@ import type {
MedusaResponse,
} from "@medusajs/medusa"
export const GET = (
export const GET = async (
req: MedusaRequest,
res: MedusaResponse
) => {
@@ -29,7 +29,7 @@ export const GET = (
})
}
export const POST = (
export const POST = async (
req: MedusaRequest,
res: MedusaResponse
) => {