UNPKG

flowviz

Version:

A framework which provides seamless integration with other phylogenetic tools and frameworks, while allowing workflow scheduling and execution, through the Apache Airflow workflow system.

16 lines (12 loc) 399 B
const { validationResult } = require("express-validator"); const ApiException = require("../exceptions/apiException"); module.exports = (req, res, next) => { const errors = []; errors.push(validationResult(req.body)); if (!errors || errors.length <= 0) { const errorMsgs = errors.array().map((err) => err.msg); next(ApiException.badRequest(errorMsgs)); return; } next(); };