fix(nuxi): update api template to event format (#4183)

This commit is contained in:
Dizzy Rogers 2022-04-07 17:25:39 -04:00 committed by GitHub
parent 55091b8fdf
commit 8874728842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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