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 authored and GitHub committed 2024-09-04 18:23:55 +00:00
1 parent ee3580efdb
commit 1d54e8fdc1
11 files changed
+787 -166

No files matched your search

@@ -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
) => {