1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.query = exports.param = exports.header = exports.cookie = exports.body = exports.check = exports.buildCheckFunction = void 0;
|
4 | const check_1 = require("./check");
|
5 | function buildCheckFunction(locations) {
|
6 | return (fields, message) => check_1.check(fields, locations, message);
|
7 | }
|
8 | exports.buildCheckFunction = buildCheckFunction;
|
9 | exports.check = buildCheckFunction(['body', 'cookies', 'headers', 'params', 'query']);
|
10 | exports.body = buildCheckFunction(['body']);
|
11 | exports.cookie = buildCheckFunction(['cookies']);
|
12 | exports.header = buildCheckFunction(['headers']);
|
13 | exports.param = buildCheckFunction(['params']);
|
14 | exports.query = buildCheckFunction(['query']);
|