We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e3c753 commit a12fedfCopy full SHA for a12fedf
1 file changed
src/middlewares/logger.js
@@ -94,7 +94,7 @@ export const requestLogger = async (req, res, next) => {
94
const now = new Date();
95
const dateKey = now.toISOString().split('T')[0]; // "YYYY-MM-DD"
96
const pathSegments = req.path.split('/').filter(Boolean); // Remove empty segments
97
- const endpoint = pathSegments.length > 2 ? pathSegments[pathSegments.length - 2] : pathSegments.pop();
+ const endpoint = pathSegments[2];
98
99
const IMAGE_URL = 'https://i.imgur.com/c55SNmu.png';
100
hook.setUsername('API Logger');
0 commit comments