This module is currently logging success requests but not errors
Besides its opinionated. It only logs requests where you restructure your controller with
const { data } = await userService.getAllUsers()
res.status(statusCode).json({ data })
- Otherwise it fails if you do something hacky like this
const { users } = await userService.getAllUsers()
res.status(statusCode).json({ data: users })
Advise is welcome. In the controller should i go with approach 1 or 2 🤔
This module is currently logging success requests but not errors
Besides its opinionated. It only logs requests where you restructure your controller with
Advise is welcome. In the controller should i go with approach 1 or 2 🤔