pg-mvc-service 2.0.75 → 2.0.77
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.
|
@@ -323,6 +323,7 @@ class RequestType extends ReqResType_1.default {
|
|
|
323
323
|
switch (typeof mapValue) {
|
|
324
324
|
case 'boolean':
|
|
325
325
|
mapData[mapKey] = mapValue;
|
|
326
|
+
break;
|
|
326
327
|
case 'number':
|
|
327
328
|
if (mapValue !== 0 && mapValue !== 1) {
|
|
328
329
|
this.throwInputError("MAP_03", [key], mapValue);
|
|
@@ -457,7 +458,6 @@ class RequestType extends ReqResType_1.default {
|
|
|
457
458
|
case 'map':
|
|
458
459
|
case 'map?':
|
|
459
460
|
const mapData = {};
|
|
460
|
-
console.log("amp-value", values[i]);
|
|
461
461
|
for (const [mapKey, mapValue] of Object.entries(values[i])) {
|
|
462
462
|
switch (property.item.mapType) {
|
|
463
463
|
case 'number':
|
|
@@ -482,6 +482,7 @@ class RequestType extends ReqResType_1.default {
|
|
|
482
482
|
switch (typeof mapValue) {
|
|
483
483
|
case 'boolean':
|
|
484
484
|
mapData[mapKey] = mapValue;
|
|
485
|
+
break;
|
|
485
486
|
case 'number':
|
|
486
487
|
if (mapValue !== 0 && mapValue !== 1) {
|
|
487
488
|
this.throwInputError("MAP_33", keys, mapValue);
|
|
@@ -609,23 +610,24 @@ class RequestType extends ReqResType_1.default {
|
|
|
609
610
|
}
|
|
610
611
|
break;
|
|
611
612
|
case 'bool':
|
|
612
|
-
switch (typeof
|
|
613
|
+
switch (typeof mapValue) {
|
|
613
614
|
case 'boolean':
|
|
614
|
-
mapData[mapKey] =
|
|
615
|
+
mapData[mapKey] = mapValue;
|
|
616
|
+
break;
|
|
615
617
|
case 'number':
|
|
616
|
-
if (
|
|
617
|
-
this.throwInputError("MAP_13", keys,
|
|
618
|
+
if (mapValue !== 0 && mapValue !== 1) {
|
|
619
|
+
this.throwInputError("MAP_13", keys, mapValue);
|
|
618
620
|
}
|
|
619
|
-
mapData[mapKey] =
|
|
621
|
+
mapData[mapKey] = mapValue === 1;
|
|
620
622
|
break;
|
|
621
623
|
case 'string':
|
|
622
|
-
if (
|
|
623
|
-
this.throwInputError("MAP_14", keys,
|
|
624
|
+
if (mapValue !== 'true' && mapValue !== 'false') {
|
|
625
|
+
this.throwInputError("MAP_14", keys, mapValue);
|
|
624
626
|
}
|
|
625
|
-
mapData[mapKey] =
|
|
627
|
+
mapData[mapKey] = mapValue === 'true';
|
|
626
628
|
break;
|
|
627
629
|
default:
|
|
628
|
-
this.throwInputError("MAP_15", keys,
|
|
630
|
+
this.throwInputError("MAP_15", keys, mapValue);
|
|
629
631
|
}
|
|
630
632
|
break;
|
|
631
633
|
}
|
package/package.json
CHANGED
|
@@ -334,6 +334,7 @@ export class RequestType extends ReqResType {
|
|
|
334
334
|
switch (typeof mapValue) {
|
|
335
335
|
case 'boolean':
|
|
336
336
|
mapData[mapKey] = mapValue;
|
|
337
|
+
break;
|
|
337
338
|
case 'number':
|
|
338
339
|
if (mapValue !== 0 && mapValue !== 1) {
|
|
339
340
|
this.throwInputError("MAP_03", [key], mapValue);
|
|
@@ -477,7 +478,6 @@ export class RequestType extends ReqResType {
|
|
|
477
478
|
case 'map':
|
|
478
479
|
case 'map?':
|
|
479
480
|
const mapData: {[key: string]: string | number | boolean} = {};
|
|
480
|
-
console.log("amp-value", values[i]);
|
|
481
481
|
for (const [mapKey, mapValue] of Object.entries(values[i])) {
|
|
482
482
|
switch (property.item.mapType) {
|
|
483
483
|
case 'number':
|
|
@@ -502,6 +502,7 @@ export class RequestType extends ReqResType {
|
|
|
502
502
|
switch (typeof mapValue) {
|
|
503
503
|
case 'boolean':
|
|
504
504
|
mapData[mapKey] = mapValue;
|
|
505
|
+
break;
|
|
505
506
|
case 'number':
|
|
506
507
|
if (mapValue !== 0 && mapValue !== 1) {
|
|
507
508
|
this.throwInputError("MAP_33", keys, mapValue);
|
|
@@ -633,23 +634,24 @@ export class RequestType extends ReqResType {
|
|
|
633
634
|
}
|
|
634
635
|
break;
|
|
635
636
|
case 'bool':
|
|
636
|
-
switch (typeof
|
|
637
|
+
switch (typeof mapValue) {
|
|
637
638
|
case 'boolean':
|
|
638
|
-
mapData[mapKey] =
|
|
639
|
+
mapData[mapKey] = mapValue;
|
|
640
|
+
break;
|
|
639
641
|
case 'number':
|
|
640
|
-
if (
|
|
641
|
-
this.throwInputError("MAP_13", keys,
|
|
642
|
+
if (mapValue !== 0 && mapValue !== 1) {
|
|
643
|
+
this.throwInputError("MAP_13", keys, mapValue);
|
|
642
644
|
}
|
|
643
|
-
mapData[mapKey] =
|
|
645
|
+
mapData[mapKey] = mapValue === 1;
|
|
644
646
|
break;
|
|
645
647
|
case 'string':
|
|
646
|
-
if (
|
|
647
|
-
this.throwInputError("MAP_14", keys,
|
|
648
|
+
if (mapValue !== 'true' && mapValue !== 'false') {
|
|
649
|
+
this.throwInputError("MAP_14", keys, mapValue);
|
|
648
650
|
}
|
|
649
|
-
mapData[mapKey] =
|
|
651
|
+
mapData[mapKey] = mapValue === 'true';
|
|
650
652
|
break;
|
|
651
653
|
default:
|
|
652
|
-
this.throwInputError("MAP_15", keys,
|
|
654
|
+
this.throwInputError("MAP_15", keys, mapValue);
|
|
653
655
|
}
|
|
654
656
|
break;
|
|
655
657
|
}
|