docs(examples): rename hello.ts to [...hello].ts (#5261)

Co-authored-by: pooya parsa <pyapar@gmail.com>
This commit is contained in:
Qin Guan 2022-06-23 01:25:27 +08:00 committed by GitHub
parent 1b6289f60f
commit 2156079405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -0,0 +1,4 @@
export default defineEventHandler(event => ({
path: '/api/' + event.context.params.hello,
query: useQuery(event)
}))

View File

@ -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)
})