@bluedot-innovation/models 2.0.1 → 2.0.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 2.0.2
2
+ - Added patcher to beacon model
3
+
1
4
  ## 2.0.1
2
5
  - Beacon model: guid -> id
3
6
 
package/models/Beacon.js CHANGED
@@ -2,6 +2,7 @@ let mongoose = require('mongoose')
2
2
  let StateEnum = require('@bluedot-innovation/enums').StateEnum
3
3
  let Point = require('../schemas/Point')
4
4
  let uuidv4 = require('uuid/v4')
5
+ let patcher = require('mongoose-json-patch')
5
6
 
6
7
  let schema = {
7
8
  _id: {type: String, default: uuidv4},
@@ -41,6 +42,7 @@ let schema = {
41
42
  }
42
43
 
43
44
  let BeaconSchema = new mongoose.Schema(schema, {collection: 'beacon'})
45
+ BeaconSchema.plugin(patcher)
44
46
 
45
47
  // mongoose validator helper plugin
46
48
  BeaconSchema.post('validate', function (doc) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "",
5
5
  "main": "Models.js",
6
6
  "scripts": {