Skip to content

Commit

Permalink
πŸ‘Œ IMPROVE: logs only for development
Browse files Browse the repository at this point in the history
  • Loading branch information
hyper-dot committed Oct 12, 2024
1 parent 0bd315d commit 25ae6e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ export class App {
}

private setRoutes() {
this.app.use('*', (req, res, next) => {
console.log('BODY', req.body);
console.log('QUERY', req.query);
next();
});
this.app.use('/user', userRoutes);
this.app.use('/auth', authRoutes);
this.app.use('/otp', otpRoutes);

if (process.env.ENV === 'development') {
this.app.use('*', (req, res, next) => {
console.log('BODY', req.body);
console.log('QUERY', req.query);
next();
});
this.app.use('/docs', swaggerUi.serve, swaggerUi.setup(swaggerConfig));
}
}
Expand Down

0 comments on commit 25ae6e9

Please sign in to comment.