Fixed filtering
This commit is contained in:
parent
c36c9ac46a
commit
b39e5b5825
@ -15,14 +15,14 @@ import {
|
|||||||
// list of stock events
|
// list of stock events
|
||||||
router.get('/', isAuthenticated, (req, res) => {
|
router.get('/', isAuthenticated, (req, res) => {
|
||||||
const { page, limit, sort, order } = req.query;
|
const { page, limit, sort, order } = req.query;
|
||||||
const allowedFilters = ['owner_.id', 'parent._id'];
|
const allowedFilters = ['owner._id', 'parent._id'];
|
||||||
const filter = getFilter(req.query, allowedFilters);
|
const filter = getFilter(req.query, allowedFilters);
|
||||||
listStockEventsRouteHandler(req, res, page, limit, filter, sort, order);
|
listStockEventsRouteHandler(req, res, page, limit, filter, sort, order);
|
||||||
});
|
});
|
||||||
|
|
||||||
router.get('/properties', isAuthenticated, (req, res) => {
|
router.get('/properties', isAuthenticated, (req, res) => {
|
||||||
let properties = convertPropertiesString(req.query.properties);
|
let properties = convertPropertiesString(req.query.properties);
|
||||||
const allowedFilters = ['owner_.id', 'parent._id'];
|
const allowedFilters = ['owner._id', 'parent._id'];
|
||||||
const filter = getFilter(req.query, allowedFilters, false);
|
const filter = getFilter(req.query, allowedFilters, false);
|
||||||
var masterFilter = {};
|
var masterFilter = {};
|
||||||
if (req.query.masterFilter) {
|
if (req.query.masterFilter) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user