mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
docs: remove duplicated arrows (#23436)
This commit is contained in:
parent
6fcc979877
commit
c54719e987
@ -185,29 +185,29 @@ You can also use `index.[method].ts` inside a directory for structuring your cod
|
||||
**Example:**
|
||||
|
||||
```ts [server/api/foo/index.ts]
|
||||
export default defineEventHandler((event) => => {
|
||||
export default defineEventHandler((event) => {
|
||||
// handle the `api/foo` endpoint
|
||||
})
|
||||
```
|
||||
|
||||
This is useful to create API namespaces.
|
||||
|
||||
**Example:**
|
||||
**Examples:**
|
||||
|
||||
```ts [server/api/foo/index.get.ts]
|
||||
export default defineEventHandler((event) => => {
|
||||
export default defineEventHandler((event) => {
|
||||
// handle GET requests for the `api/foo` endpoint
|
||||
})
|
||||
```
|
||||
|
||||
```ts [server/api/foo/index.post.ts]
|
||||
export default defineEventHandler((event) => => {
|
||||
export default defineEventHandler((event) => {
|
||||
// handle POST requests for the `api/foo` endpoint
|
||||
})
|
||||
```
|
||||
|
||||
```ts [server/api/foo/bar.get.ts]
|
||||
export default defineEventHandler((event) => => {
|
||||
export default defineEventHandler((event) => {
|
||||
// handle GET requests for the `api/foo/bar` endpoint
|
||||
})
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user