BuildCheckFunction (Lokasi)

const { buildCheckFunction } = require('express-validator');
const checkBodyAndQuery = buildCheckFunction(['body', 'query']);

app.put(
  '/update-product',
  // id must be either in req.body or req.query, and must be an UUID
  checkBodyAndQuery('id').isUUID(),
  productUpdateHandler,
);
Odd Oystercatcher