@axway/api-builder-plugin-dc-mbs
Version:
Mobile Backend Services connector
18 lines (14 loc) • 428 B
JavaScript
function distinct(Model, field, options, next) {
this.logger.trace('MBS distinct', { field, options, model: Model.name });
const skip = options.skip || 0;
if (skip >= 5000) {
const error = new Error('Skip must be less than 5000');
error.status = 400;
return next(error);
}
const { Connector } = this.runtime;
Connector.prototype.distinct.call(this, Model, field, options, next);
}
module.exports = {
distinct
};