From e1f5b075cd5636b8cb98e238a214f623a6e98a62 Mon Sep 17 00:00:00 2001 From: Cyb3r-Jak3 Date: Thu, 24 Apr 2025 23:59:42 -0400 Subject: [PATCH] Upgrade to router.fetch --- index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 385bdf5..9d3fbce 100644 --- a/index.ts +++ b/index.ts @@ -31,7 +31,7 @@ const router = Router(); /** * V2 Api */ -router.all("/v2/*", v2Router.handle); +router.all("/v2/*", v2Router.fetch); router.all("*", () => new Response("Not Found.", { status: 404 })); @@ -55,7 +55,7 @@ export default { env.REGISTRY_CLIENT = new R2Registry(env); try { // Dispatch the request to the appropriate route - const res = await router.handle(request, env, context); + const res = await router.fetch(request, env, context); return res; } catch (err) { if (err instanceof Response) {