badmfck-api-server 3.7.7 → 3.7.8

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.
@@ -95,7 +95,7 @@ async function Initializer(services) {
95
95
  exports.Initializer = Initializer;
96
96
  class APIService extends BaseService_1.BaseService {
97
97
  static nextLogID = 0;
98
- version = "3.7.7";
98
+ version = "3.7.8";
99
99
  options;
100
100
  monitor = null;
101
101
  started = new Date();
@@ -98,7 +98,7 @@ class Validator {
98
98
  }
99
99
  else {
100
100
  if (!optional) {
101
- errors.push("no field '" + i + "'");
101
+ errors.push("no field '" + parentPath + i + "'");
102
102
  continue;
103
103
  }
104
104
  else {
@@ -109,7 +109,7 @@ class Validator {
109
109
  }
110
110
  if (object[i] === null || object[i] === undefined) {
111
111
  if (!optional)
112
- errors.push("no value for field '" + i + "'");
112
+ errors.push("no value for field '" + parentPath + i + "'");
113
113
  else {
114
114
  foundKeys.push(i);
115
115
  continue;
@@ -120,7 +120,7 @@ class Validator {
120
120
  if (object[i].includes(","))
121
121
  num = parseFloat(object[i]);
122
122
  if (isNaN(num))
123
- errors.push("wrong value for field '" + i + "', expected number got " + object[i]);
123
+ errors.push("wrong value for field '" + parentPath + i + "', expected number got " + object[i]);
124
124
  else
125
125
  object[i] = num;
126
126
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "3.7.7",
3
+ "version": "3.7.8",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",