koa router不再支持*的路由注册方式。

This commit is contained in:
undefined committed 2020-08-20 10:49:42 +08:00
1 parent 37d7bb526c
commit 65a50275b1
3 files changed
+9 -3

No files matched your search

+8 -1
View File
@@ -12,7 +12,14 @@ class NotFoundHandler extends Handler {
}
export async function apply() {
Route('notfound', '*', NotFoundHandler);
Route('notfound', '/:a', NotFoundHandler);
Route('notfound', '/:a/:b', NotFoundHandler);
Route('notfound', '/:a/:b/:c', NotFoundHandler);
Route('notfound', '/:a/:b/:c/:d', NotFoundHandler);
Route('notfound', '/:a/:b/:c/:d/:e', NotFoundHandler);
Route('notfound', '/:a/:b/:c/:d/:e/:f', NotFoundHandler);
Route('notfound', '/:a/:b/:c/:d/:e/:f/:g', NotFoundHandler);
Route('notfound', '/:a/:b/:c/:d/:e/:f/:g/:h', NotFoundHandler);
}
global.Hydro.handler.notfound = apply;