Hello Typescript!

This commit is contained in:
undefined committed 2020-07-07 19:58:21 +08:00
1 parent c9b6412527
commit ba03d7a7bf
98 files changed
+3186 -2616

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
/* eslint-disable no-empty-function */
/* eslint-disable class-methods-use-this */
import { NotFoundError } from '../error';
import { Route, Handler } from '../service/server';
class NotFoundHandler extends Handler {
async prepare() {
throw new NotFoundError();
}
async get() { }
async post() { }
}
export async function apply() {
Route('notfound', '*', NotFoundHandler);
}
global.Hydro.handler.notfound = apply;