Fix: wrong endpoint type in handler logging
This commit is contained in:
parent
c13bbc7357
commit
4ce737a3dd
@ -17,25 +17,11 @@ async function genHandler() {
|
|||||||
const { default: endpoint } = await import(`.${pagesPath}/${file}`);
|
const { default: endpoint } = await import(`.${pagesPath}/${file}`);
|
||||||
handler[endpoint.type].push(endpoint);
|
handler[endpoint.type].push(endpoint);
|
||||||
console.log(
|
console.log(
|
||||||
`\x1b[32mChargement de POST: ${endpoint.path} !\x1b[0m`,
|
`\x1b[32mChargement de ${endpoint.type.toUpperCase()}: ${endpoint.path} !\x1b[0m`,
|
||||||
);
|
);
|
||||||
numberOfPages++;
|
numberOfPages++;
|
||||||
console.log(numberOfPages + " endpoints chargés ! ");
|
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;
|
return handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user