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; }