Updated allowedFilters in printers.js to include '_id' and '_reference' for enhanced filtering capabilities in printer queries. Cleaned up unnecessary whitespace in the file.
This commit is contained in:
parent
3155733642
commit
7a1b85bb19
@ -11,14 +11,14 @@ import {
|
||||
listPrintersByPropertiesRouteHandler,
|
||||
getPrinterHistoryRouteHandler,
|
||||
searchPrintersRouteHandler,
|
||||
getPrinterPropertyValuesRouteHandler
|
||||
getPrinterPropertyValuesRouteHandler,
|
||||
} from '../../services/production/printers.js';
|
||||
import { convertPropertiesString, getFilter } from '../../utils.js';
|
||||
|
||||
// list of printers
|
||||
router.get('/', isAuthenticated, (req, res) => {
|
||||
const { page, limit, property, search, sort, order } = req.query;
|
||||
const allowedFilters = ['tags', 'host._id', 'active', 'online', 'name'];
|
||||
const allowedFilters = ['tags', 'host._id', 'active', 'online', 'name', '_id', '_reference'];
|
||||
const filter = getFilter(req.query, allowedFilters);
|
||||
listPrintersRouteHandler(req, res, page, limit, property, filter, search, sort, order);
|
||||
});
|
||||
@ -43,7 +43,6 @@ router.get('/search', isAuthenticated, (req, res) => {
|
||||
searchPrintersRouteHandler(req, res, search);
|
||||
});
|
||||
|
||||
|
||||
// create new printer
|
||||
router.post('/', isAuthenticated, (req, res) => {
|
||||
newPrinterRouteHandler(req, res);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user