examples/helloworld/src/routes/crud/delete.ts
import { Route, RouteContext } from '@seagull/routes'
import { Term } from '../../items/index'
export default class extends Route {
static method = 'POST' as const
static path = '/glossary/delete'
static async handler(this: RouteContext) {
const { word } = this.request.body
await Term.delete(word)
this.redirect('/glossary')
}
}