Function fetchData
has 29 lines of code (exceeds 25 allowed). Consider refactoring.
const fetchData = (req, res) => {
const params = Object.assign(req.query, req.params);
db.query(params)
.then((result) => {
const response = result.map((dataPoint) =>