@justair/justair-library 4.8.48 → 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 +1 -1
- package/src/models/monitors.js +13 -2
package/package.json
CHANGED
package/src/models/monitors.js
CHANGED
|
@@ -230,8 +230,19 @@ const monitorsSchema = mongoose.Schema(
|
|
|
230
230
|
monitorLatitude: Number,
|
|
231
231
|
monitorLongitude: Number,
|
|
232
232
|
gpsLocation: {
|
|
233
|
-
type: {
|
|
234
|
-
|
|
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
|
+
},
|
|
235
246
|
},
|
|
236
247
|
location: Object,
|
|
237
248
|
context: [String],
|