@bluedot-innovation/models 2.0.19-alpha.7 → 2.0.19-alpha.9

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.
Files changed (2) hide show
  1. package/models/Zone.js +9 -1
  2. package/package.json +1 -1
package/models/Zone.js CHANGED
@@ -22,7 +22,14 @@ let percentageCrossedFilterSchema = require('./PercentageCrossedFilter').percent
22
22
  let uuidv4 = require('uuid/v4')
23
23
  let patcher = require('mongoose-json-patch')
24
24
  let helpers = require('../helpers')
25
- const mongooseHidden = require('../utils/mongooseHidden')
25
+
26
+ const mongooseHidden = require('mongoose-hidden')({defaultHidden: {
27
+ state: true,
28
+ creationTime: true,
29
+ lastUpdateTime: true,
30
+ __v: true,
31
+ secret: true
32
+ }})
26
33
 
27
34
  // ////// //
28
35
  // Schema //
@@ -88,6 +95,7 @@ zoneSchema.path('geofeatures').discriminator('boundingBox', new Schema(boundingB
88
95
  // TODO: Test patcher and include for other schemas if required
89
96
  zoneSchema.plugin(patcher)
90
97
  zoneSchema.plugin(mongooseHidden)
98
+ zoneSchema.path('geofeatures').plugin(mongooseHidden)
91
99
 
92
100
  // optional mongoose
93
101
  const model = (mongooseInstance) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "2.0.19-alpha.7",
3
+ "version": "2.0.19-alpha.9",
4
4
  "description": "",
5
5
  "main": "Models.js",
6
6
  "scripts": {