Update page.mdx (#8908)

Fix API route path in the example.
This commit is contained in:
Attila Turcsan
2024-08-30 15:11:32 +02:00
committed by GitHub
parent 48d4a97ad2
commit b9eac4402b

View File

@@ -10,7 +10,7 @@ In this chapter, youll learn about path, query, and request body parameters.
To create an API route that accepts a path parameter, create a directory within the route file's path whose name is of the format `[param]`.
For example, to create an API Route at the path `/message/{id}`, where `{id}` is a path parameter, create the file `src/api/store/hello-world/[id]/route.ts` with the following content:
For example, to create an API Route at the path `/hello-world/{id}`, where `{id}` is a path parameter, create the file `src/api/store/hello-world/[id]/route.ts` with the following content:
export const singlePathHighlights = [
["11", "req.params.id", "Access the path parameter `id`"]