Commit 86d00ce3 authored by Miguel Angelo Salerno's avatar Miguel Angelo Salerno

uncomment rqf build section

parent dd15119b
Pipeline #24423 failed with stage
in 2 minutes and 11 seconds
......@@ -625,31 +625,31 @@ disciplinesApp.get('/', rqf.parse(), (req, res, next) => {
req.result = results;
}
else { */}
// let disciplinesNotSuitable = [];
// let disciplinesSuitable = [];
// req.result.forEach((r) => {
// let objNotSuitable = {
// total: parseInt(r.total) - parseInt(r.total_suitable),
// suitable: 0
// }
// let objSuitable = {
// total: parseInt(r.total_suitable),
// suitable: 1
// }
// Object.keys(r).forEach(k => {
// if (k !== 'total' && k !== 'total_suitable') {
// objNotSuitable[k] = r[k];
// objSuitable[k] = r[k];
// }
// })
// disciplinesNotSuitable.push(objNotSuitable)
// disciplinesSuitable.push(objSuitable)
// })
// req.result = disciplinesNotSuitable.concat(disciplinesSuitable);
let disciplinesNotSuitable = [];
let disciplinesSuitable = [];
req.result.forEach((r) => {
let objNotSuitable = {
total: parseInt(r.total) - parseInt(r.total_suitable),
suitable: 0
}
let objSuitable = {
total: parseInt(r.total_suitable),
suitable: 1
}
Object.keys(r).forEach(k => {
if (k !== 'total' && k !== 'total_suitable') {
objNotSuitable[k] = r[k];
objSuitable[k] = r[k];
}
})
disciplinesNotSuitable.push(objNotSuitable)
disciplinesSuitable.push(objSuitable)
})
req.result = disciplinesNotSuitable.concat(disciplinesSuitable);
next();
}, response('disciplines'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment