From 7a1b85bb1964ceb6c015788d0bc8e394cf722a03 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sat, 1 Aug 2026 12:41:29 +0100 Subject: [PATCH] Updated allowedFilters in printers.js to include '_id' and '_reference' for enhanced filtering capabilities in printer queries. Cleaned up unnecessary whitespace in the file. --- src/routes/production/printers.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/routes/production/printers.js b/src/routes/production/printers.js index 24e07a5..209333b 100644 --- a/src/routes/production/printers.js +++ b/src/routes/production/printers.js @@ -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);