pull/60/head
HardiReady 2019-10-01 12:03:18 +02:00
parent 36ad89d04c
commit f03d75d9d8
1 changed files with 5 additions and 3 deletions

View File

@ -37,9 +37,11 @@ decorationRouter.route('/')
.get((req, res, next) => { .get((req, res, next) => {
const filter = {}; const filter = {};
if (req.query.fractFilter) { if (req.query.fractFilter) {
filter.fraction = { "$in" : req.query.fractFilter filter.fraction = {
'$in': req.query.fractFilter
.toUpperCase() .toUpperCase()
.split(',')}; .split(','),
};
} }
if (req.query.q) { if (req.query.q) {
filter.name = {$regex: req.query.q, $options: 'i'}; filter.name = {$regex: req.query.q, $options: 'i'};