Added 'operation' to allowed filters in audit log route for enhanced filtering capabilities.
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-07-13 23:26:55 +01:00
parent ce6f396bcb
commit 561520be9a

View File

@ -5,7 +5,7 @@ import {
getAuditLogRouteHandler,
getAuditLogStatsRouteHandler,
getAuditLogHistoryRouteHandler,
searchAuditLogsRouteHandler
searchAuditLogsRouteHandler,
} from '../../services/management/auditlogs.js';
import { parseFilter } from '../../utils.js';
@ -15,7 +15,7 @@ const router = express.Router();
router.get('/', isAuthenticated, async (req, res) => {
const { page, limit, sort, order } = req.query;
const allowedFilters = ['parent._id', 'owner._id'];
const allowedFilters = ['parent._id', 'owner._id', 'operation'];
var filter = {};