@justair/justair-library 3.3.4-tango → 3.3.4-victor

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justair/justair-library",
3
- "version": "3.3.4-tango",
3
+ "version": "3.3.4-victor",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -81,24 +81,13 @@ const monitorsSchema = mongoose.Schema(
81
81
  calculatedAverages: [Object],
82
82
  images: [String],
83
83
  isActive: { type: Boolean, default: true },
84
- parameterThresholds: { type: mongoose.Schema.Types.Mixed, }
84
+ parameterThresholds: Object
85
85
  },
86
86
  {
87
87
  timestamps: true,
88
88
  }
89
89
  );
90
90
 
91
- monitorsSchema.path('parameterThresholds').validate({
92
- validator: function(v) {
93
- return Object.keys(v).every(key => {
94
- console.log(v)
95
- console.log(key)
96
- return parametersEnum.includes(key)
97
- });
98
- },
99
- message: props => `${props.value} is not a valid parameter threshold object`
100
- })
101
-
102
91
  monitorsSchema.index({ gpsLocation: "2dsphere" });
103
92
  monitorsSchema.index({ monitorSupplier: 1 });
104
93
  monitorsSchema.index({ monitorIdFromSupplier: 1 });