mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +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:**
|
**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
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user