@justair/justair-library 3.3.4-november → 3.3.4-oscar
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.
- package/package.json +1 -1
- package/src/models/monitors.js +1 -7
package/package.json
CHANGED
package/src/models/monitors.js
CHANGED
|
@@ -97,13 +97,7 @@ const monitorsSchema = mongoose.Schema(
|
|
|
97
97
|
type: mongoose.Schema.Types.Mixed,
|
|
98
98
|
validate: {
|
|
99
99
|
validator: function(v) {
|
|
100
|
-
return Object.keys(v).every(key =>
|
|
101
|
-
parametersEnum.includes(key) &&
|
|
102
|
-
thresholdSchema.path('invalid.min').instance(v[key].invalid.min) &&
|
|
103
|
-
thresholdSchema.path('invalid.max').instance(v[key].invalid.max) &&
|
|
104
|
-
thresholdSchema.path('warning.min').instance(v[key].warning.min) &&
|
|
105
|
-
thresholdSchema.path('warning.max').instance(v[key].warning.max)
|
|
106
|
-
);
|
|
100
|
+
return Object.keys(v).every(key => parametersEnum.includes(key));
|
|
107
101
|
},
|
|
108
102
|
message: props => `${props.value} is not a valid parameter threshold object`
|
|
109
103
|
}
|