Enhance printer filtering: Added 'host._id' to the allowed filters in the printers route to improve data retrieval capabilities.

This commit is contained in:
Tom Butcher 2025-09-05 23:26:04 +01:00
parent 2fdb77e4bb
commit 5cac77a975

View File

@ -15,7 +15,7 @@ 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'];
const allowedFilters = ['tags', 'host._id'];
const filter = getFilter(req.query, allowedFilters);
listPrintersRouteHandler(req, res, page, limit, property, filter, search, sort, order);
});