UNPKG

@accounts/rest-express

Version:

Server side REST express middleware for accounts

12 lines 459 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.matchOrThrow = void 0; const express_validator_1 = require("express-validator"); function matchOrThrow(...args) { if (!(0, express_validator_1.validationResult)(args[0]).isEmpty()) { throw new Error('Validation error'); } return (0, express_validator_1.matchedData)(...args); } exports.matchOrThrow = matchOrThrow; //# sourceMappingURL=matchOrTrow.js.map