docs: use 200 for routes response across docs (#14418)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-12-30 09:36:10 +02:00
1 parent 4ac7b72d10
commit 1de4d1e700
10 files changed
+22 -20

No files matched your search

@@ -58,7 +58,7 @@ export const GET = async (
req: MedusaRequest,
res: MedusaResponse
) => {
res.status(201).json({
res.status(200).json({
message: "Hello, World!",
})
}
+1 -1
View File
@@ -57,7 +57,7 @@ export const generatedEditDates = {
"app/learn/debugging-and-testing/testing-tools/unit-tests/module-example/page.mdx": "2024-09-02T11:04:27.232Z",
"app/learn/debugging-and-testing/testing-tools/unit-tests/page.mdx": "2024-09-02T11:03:26.997Z",
"app/learn/fundamentals/modules/service-constraints/page.mdx": "2025-03-18T15:12:46.006Z",
"app/learn/fundamentals/api-routes/responses/page.mdx": "2025-09-03T06:21:27.054Z",
"app/learn/fundamentals/api-routes/responses/page.mdx": "2025-12-30T06:35:16.514Z",
"app/learn/fundamentals/api-routes/validation/page.mdx": "2025-03-24T06:52:47.896Z",
"app/learn/fundamentals/api-routes/errors/page.mdx": "2025-06-19T16:09:08.563Z",
"app/learn/fundamentals/admin/constraints/page.mdx": "2025-07-21T08:20:43.223Z",
+7 -7
View File
@@ -11538,7 +11538,7 @@ export const GET = async (
req: MedusaRequest,
res: MedusaResponse
) => {
res.status(201).json({
res.status(200).json({
message: "Hello, World!",
})
}
@@ -57655,7 +57655,7 @@ export const GET = async (
req: MedusaRequest,
res: MedusaResponse
) => {
res.status(201).json({
res.status(200).json({
message: "Hello, World!",
})
}
@@ -61517,7 +61517,7 @@ export const POST = async (req: AuthenticatedMedusaRequest<CreateUserBody>, res:
},
})
return res.status(201).json({ user })
return res.status(200).json({ user })
}
```
@@ -64460,7 +64460,7 @@ export const GET = async (
},
})
res.set(responseHeaders).status(201).json(result)
res.set(responseHeaders).status(200).json(result)
} catch (error) {
const medusaError = error as MedusaError
const statusCode = medusaError.type === MedusaError.Types.NOT_FOUND ? 404 : 500
@@ -106540,7 +106540,7 @@ export const POST = async (
},
})
return res.status(201).json({ user })
return res.status(200).json({ user })
}
```
@@ -140736,7 +140736,7 @@ export async function POST(
},
})
return res.sendStatus(201)
return res.sendStatus(200)
}
```
@@ -146991,7 +146991,7 @@ export const POST = async (
} as CreateUserWorkflowInput,
})
res.status(201).json({ user: result.user })
res.status(200).json({ user: result.user })
}
```