@autofleet/sheilta 1.0.6-aaron-test → 1.0.7-aaron-test

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,20 +76,19 @@ const validateIncludePayload = (include, associations) => {
76
76
  utils_1.throwBadRequestError('model not found in associations');
77
77
  }
78
78
  const { rawAttributes } = target;
79
- if (include.where) {
79
+ if (i.where) {
80
80
  validateQueryPayload(i.where, rawAttributes);
81
81
  }
82
- if (include.order) {
82
+ if (i.order) {
83
83
  validateOrderAttributes(i.order, rawAttributes);
84
84
  }
85
- if (include.attributes) {
85
+ if (i.attributes) {
86
86
  validateAttributes(i.attributes, rawAttributes);
87
87
  }
88
- if (!lodash_1.default.isNil(include.required) && !lodash_1.default.isBoolean(include.required)) {
88
+ if (!lodash_1.default.isNil(i.required) && !lodash_1.default.isBoolean(i.required)) {
89
89
  utils_1.throwBadRequestError('include.required must be a boolean');
90
90
  }
91
91
  });
92
- console.log('loopend');
93
92
  };
94
93
  exports.validatePayload = ({ query = {}, order = [], attributes = [], include = [], page = utils_1.PAGE_DEFAULT, perPage = utils_1.PER_PAGE_DEFAULT, }, model) => {
95
94
  const rawAttributes = Object.keys(model.rawAttributes);
@@ -109,7 +108,6 @@ exports.validatePayload = ({ query = {}, order = [], attributes = [], include =
109
108
  else if (include && typeof include !== 'object') {
110
109
  utils_1.throwBadRequestError('include must be an array');
111
110
  }
112
- console.log('validatePagination');
113
111
  validatePagination({
114
112
  page,
115
113
  perPage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autofleet/sheilta",
3
- "version": "1.0.6-aaron-test",
3
+ "version": "1.0.7-aaron-test",
4
4
  "description": "manage cache",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",