From 3ed72edb2bdcdb7a2bdf415b64aa1e105ae828ef Mon Sep 17 00:00:00 2001 From: renatodellosso Date: Fri, 26 Jul 2024 19:16:50 -0400 Subject: [PATCH] Should be fixed now --- lib/API.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/API.ts b/lib/API.ts index b0105709..fb674c83 100644 --- a/lib/API.ts +++ b/lib/API.ts @@ -113,8 +113,9 @@ export namespace API { } const routeRaw = req.url.replace(this.basePath, ""); - const route = routeRaw.substring(0, routeRaw.indexOf("?")); - console.log(routeRaw, "->", route); + const route = routeRaw.includes("?") + ? routeRaw.substring(0, routeRaw.indexOf("?")) + : routeRaw; if (route in this.routes) { this.routes[route](req, res, {