release: 0.0.3-1

This commit is contained in:
2024-08-01 13:26:50 +08:00
parent 79b9fba1cd
commit 89c5ed561a
12 changed files with 484 additions and 31 deletions

View File

@ -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