mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
docs(examples): rename hello.ts
to [...hello].ts
(#5261)
Co-authored-by: pooya parsa <pyapar@gmail.com>
This commit is contained in:
parent
1b6289f60f
commit
2156079405
4
examples/composables/use-fetch/server/api/[...hello].ts
Normal file
4
examples/composables/use-fetch/server/api/[...hello].ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export default defineEventHandler(event => ({
|
||||||
|
path: '/api/' + event.context.params.hello,
|
||||||
|
query: useQuery(event)
|
||||||
|
}))
|
@ -1,7 +0,0 @@
|
|||||||
import { useQuery } from 'h3'
|
|
||||||
import { parseURL } from 'ufo'
|
|
||||||
|
|
||||||
export default req => ({
|
|
||||||
path: '/api/hello' + parseURL(req.url).pathname,
|
|
||||||
query: useQuery(req)
|
|
||||||
})
|
|
Loading…
Reference in New Issue
Block a user