Commit 6b353608 authored by nikogu's avatar nikogu
parent 2c9da749
......@@ -41,10 +41,14 @@ export function getRule(req, res, u) {
}
if (params.status) {
const s = params.status.split(',');
if (s.length === 1) {
dataSource = dataSource.filter(data => parseInt(data.status, 10) === parseInt(s[0], 10));
}
const status = params.status.split(',');
let filterDataSource = [];
status.forEach((s) => {
filterDataSource = filterDataSource.concat(
[...dataSource].filter(data => parseInt(data.status, 10) === parseInt(s[0], 10))
);
});
dataSource = filterDataSource;
}
if (params.no) {
......
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