@justair/justair-library 4.8.47 → 4.8.50

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": "4.8.47",
3
+ "version": "4.8.50",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -196,6 +196,7 @@ const monitorsSchema = mongoose.Schema(
196
196
  "aqMesh",
197
197
  "kunak",
198
198
  "airLink",
199
+ "atmotube",
199
200
  ],
200
201
  },
201
202
  monitorType: String,
@@ -229,8 +230,19 @@ const monitorsSchema = mongoose.Schema(
229
230
  monitorLatitude: Number,
230
231
  monitorLongitude: Number,
231
232
  gpsLocation: {
232
- type: { type: String, enum: ["Point"], required: true },
233
- coordinates: { type: [Number], required: true },
233
+ type: {
234
+ type: String,
235
+ enum: ["Point"],
236
+ required: function () {
237
+ return this.monitorLatitude != null && this.monitorLongitude != null;
238
+ },
239
+ },
240
+ coordinates: {
241
+ type: [Number],
242
+ required: function () {
243
+ return this.monitorLatitude != null && this.monitorLongitude != null;
244
+ },
245
+ },
234
246
  },
235
247
  location: Object,
236
248
  context: [String],