📜  buildCheckFunction(locations) - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:39.459000             🧑  作者: Mango

代码示例1
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,
);