Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const validate = this.ajv.compile({
- properties: {
- query: {
- properties: {
- limit: { type: "number" },
- page: { type: "number" },
- sort: { type: "string" },
- fields: { type: "string" }
- },
- type: "object"
- }
- },
- required: [ "query" ],
- type: "object"
- });
- const valid = validate(clientInput);
- if (!valid) {
- throw _8888ACCSharedHelper.createCustomizedError(MESSAGE_ERROR_INVALID_INPUT);
- }
- const { query } = clientInput;
Advertisement
Add Comment
Please, Sign In to add comment