mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
koa router不再支持*的路由注册方式。
This commit is contained in:
1 parent
37d7bb526c
commit
65a50275b1
3 files changed
+9
-3
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user