mirror of
https://github.com/186526/handlers.js
synced 2024-10-13 00:29:43 +00:00
release: 0.0.3-1
This commit is contained in:
@ -98,7 +98,7 @@ export class router<K = any, V = any> {
|
||||
|
||||
let mismatchCount = 0;
|
||||
|
||||
for (let route of this.routes) {
|
||||
for (const route of this.routes) {
|
||||
const isMatched = await route.exec(request.url.pathname);
|
||||
|
||||
if (!isMatched.matched) {
|
||||
@ -112,7 +112,7 @@ export class router<K = any, V = any> {
|
||||
|
||||
try {
|
||||
let thisResponse: response<V> | void = responseMessage;
|
||||
for (let handler of route.handlers) {
|
||||
for (const handler of route.handlers) {
|
||||
if (
|
||||
handler.method != request.method &&
|
||||
handler.method != methodENUM.ANY
|
||||
|
Reference in New Issue
Block a user