From 4ce737a3ddae90d93d066b00aefc1e5763fa960d Mon Sep 17 00:00:00 2001 From: Ninjdai Date: Tue, 12 Dec 2023 14:46:47 +0100 Subject: [PATCH] Fix: wrong endpoint type in handler logging --- utils/handler.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/utils/handler.js b/utils/handler.js index 412418d..1e28761 100644 --- a/utils/handler.js +++ b/utils/handler.js @@ -17,25 +17,11 @@ async function genHandler() { const { default: endpoint } = await import(`.${pagesPath}/${file}`); handler[endpoint.type].push(endpoint); console.log( - `\x1b[32mChargement de POST: ${endpoint.path} !\x1b[0m`, + `\x1b[32mChargement de ${endpoint.type.toUpperCase()}: ${endpoint.path} !\x1b[0m`, ); numberOfPages++; console.log(numberOfPages + " endpoints chargés ! "); } - /*for (const category of endpointCategories) { - const endpointFiles = fs - .readdirSync(`${pagesPath}${category}`) - .filter((file) => file.endsWith(".js")); - for (const file of endpointFiles) { - const { default: endpoint } = await import(`.${pagesPath}${category}/${file}`); - handler[endpoint.type].push(endpoint); - console.log( - `\x1b[32mChargement de POST: ${endpoint.path} !\x1b[0m`, - ); - numberOfPages++; - console.log(numberOfPages + " endpoints chargés ! "); - } - }*/ return handler; }