Skip to content
Snippets Groups Projects
Commit dd15119b authored by Miguel Angelo Salerno's avatar Miguel Angelo Salerno
Browse files

comment rqf build section

parent e8c7a9f9
No related branches found
No related tags found
1 merge request!309Merge new updates into master
Pipeline #24422 failed
......@@ -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'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment