mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxi): update api
template to event format (#4183)
This commit is contained in:
parent
55091b8fdf
commit
8874728842
@ -7,9 +7,7 @@ interface Template {
|
||||
const api: Template = ({ name }) => ({
|
||||
path: `server/api/${name}.ts`,
|
||||
contents: `
|
||||
import { defineHandle } from 'h3'
|
||||
|
||||
export default defineHandle((req, res) => {
|
||||
export default defineEventHandler((event) => {
|
||||
return 'Hello ${name}'
|
||||
})
|
||||
`
|
||||
|
Loading…
Reference in New Issue
Block a user