pg-mvc-service 2.0.81 → 2.0.83

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