@justair/justair-library 3.3.4-echo → 3.3.4-golf
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 -12
package/package.json
CHANGED
package/src/models/monitors.js
CHANGED
|
@@ -27,17 +27,6 @@ const parameterThresholdsSchema = mongoose.Schema({
|
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
29
|
|
|
30
|
-
/*Ensure the parameter value is one of our valid parameters */
|
|
31
|
-
parameterThresholdsSchema.path('parameter').validate(function(value) {
|
|
32
|
-
console.log(value)
|
|
33
|
-
for (let key of value.keys()) {
|
|
34
|
-
if (!parametersEnum.includes(key)) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return true;
|
|
39
|
-
}, 'Invalid parameter key');
|
|
40
|
-
|
|
41
30
|
// Monitors Schema
|
|
42
31
|
const monitorsSchema = mongoose.Schema(
|
|
43
32
|
{
|
|
@@ -105,7 +94,7 @@ const monitorsSchema = mongoose.Schema(
|
|
|
105
94
|
calculatedAverages: [Object],
|
|
106
95
|
images: [String],
|
|
107
96
|
isActive: { type: Boolean, default: true },
|
|
108
|
-
parameterThresholds: { type:
|
|
97
|
+
parameterThresholds: { type: Object, },
|
|
109
98
|
},
|
|
110
99
|
{
|
|
111
100
|
timestamps: true,
|