pg-mvc-service 2.0.82 → 2.0.84

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.
@@ -455,12 +455,15 @@ class RequestType extends ReqResType_1.default {
455
455
  case 'enum':
456
456
  case 'enum?':
457
457
  const toEnumValue = [];
458
+ console.log(values);
458
459
  for (const value of values) {
460
+ console.log(values, value);
459
461
  switch (property.item.enumType) {
460
462
  case 'number':
461
463
  case 'number?':
464
+ console.log(this.isNumber(value));
462
465
  if (this.isNumber(value) === false) {
463
- this.throwInputError("NUMBER_31", keys, value);
466
+ this.throwInputError("NUMBER_31", [...keys, i], value);
464
467
  }
465
468
  toEnumValue.push(Number(value));
466
469
  break;
@@ -474,12 +477,12 @@ class RequestType extends ReqResType_1.default {
474
477
  toEnumValue.push(value);
475
478
  break;
476
479
  default:
477
- this.throwInputError("STRING_31", keys, value);
480
+ this.throwInputError("STRING_31", [...keys, i], value);
478
481
  }
479
482
  break;
480
483
  }
481
484
  if (Object.keys(property.item.enums).includes(value.toString()) === false) {
482
- this.throwInputError("ENUM_32", keys, value);
485
+ this.throwInputError("ENUM_32", [...keys, i], value);
483
486
  }
484
487
  this.changeBody([...keys, i], toEnumValue);
485
488
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-mvc-service",
3
- "version": "2.0.82",
3
+ "version": "2.0.84",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/n-daira/npm-pack_mvc-service#readme",
6
6
  "bugs": {
@@ -475,12 +475,15 @@ export class RequestType extends ReqResType {
475
475
  case 'enum':
476
476
  case 'enum?':
477
477
  const toEnumValue = [];
478
+ console.log(values)
478
479
  for (const value of values) {
480
+ console.log(values, value)
479
481
  switch (property.item.enumType) {
480
482
  case 'number':
481
483
  case 'number?':
484
+ console.log(this.isNumber(value));
482
485
  if (this.isNumber(value) === false) {
483
- this.throwInputError("NUMBER_31", keys, value);
486
+ this.throwInputError("NUMBER_31", [...keys, i], value);
484
487
  }
485
488
  toEnumValue.push(Number(value));
486
489
  break;
@@ -494,13 +497,13 @@ export class RequestType extends ReqResType {
494
497
  toEnumValue.push(value);
495
498
  break;
496
499
  default:
497
- this.throwInputError("STRING_31", keys, value);
500
+ this.throwInputError("STRING_31", [...keys, i], value);
498
501
  }
499
502
  break;
500
503
  }
501
504
 
502
505
  if (Object.keys(property.item.enums).includes(value.toString()) === false) {
503
- this.throwInputError("ENUM_32", keys, value);
506
+ this.throwInputError("ENUM_32", [...keys, i], value);
504
507
  }
505
508
  this.changeBody([...keys, i], toEnumValue);
506
509
  }