docs: remove duplicated arrows (#23436)

This commit is contained in:
Damian Głowala 2023-09-27 17:16:38 +02:00 committed by GitHub
parent 6fcc979877
commit c54719e987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,29 +185,29 @@ You can also use `index.[method].ts` inside a directory for structuring your cod
**Example:** **Example:**
```ts [server/api/foo/index.ts] ```ts [server/api/foo/index.ts]
export default defineEventHandler((event) => => { export default defineEventHandler((event) => {
// handle the `api/foo` endpoint // handle the `api/foo` endpoint
}) })
``` ```
This is useful to create API namespaces. This is useful to create API namespaces.
**Example:** **Examples:**
```ts [server/api/foo/index.get.ts] ```ts [server/api/foo/index.get.ts]
export default defineEventHandler((event) => => { export default defineEventHandler((event) => {
// handle GET requests for the `api/foo` endpoint // handle GET requests for the `api/foo` endpoint
}) })
``` ```
```ts [server/api/foo/index.post.ts] ```ts [server/api/foo/index.post.ts]
export default defineEventHandler((event) => => { export default defineEventHandler((event) => {
// handle POST requests for the `api/foo` endpoint // handle POST requests for the `api/foo` endpoint
}) })
``` ```
```ts [server/api/foo/bar.get.ts] ```ts [server/api/foo/bar.get.ts]
export default defineEventHandler((event) => => { export default defineEventHandler((event) => {
// handle GET requests for the `api/foo/bar` endpoint // handle GET requests for the `api/foo/bar` endpoint
}) })
``` ```