@bluedot-innovation/models 2.0.0-beta.13 → 2.0.0-beta.15

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.0-beta.14
2
+ - Beacon model: Removed console.debug breaking lambda execution
3
+
1
4
  ## 2.0.0-beta.13
2
5
  - Beacon model: Added accountId
3
6
  - Zone model: Added beacons
@@ -8,5 +8,6 @@
8
8
  "major": 10000,
9
9
  "minor": 56466,
10
10
  "txPower": -77,
11
- "macAddress": "01:17:c5:31:84:19"
12
- }
11
+ "macAddress": "01:17:c5:31:84:19",
12
+ "accountId": "90a2ed18-86be-48e7-948b-393b8b679ef6"
13
+ }
@@ -2,7 +2,7 @@ let mongoose = require('mongoose')
2
2
 
3
3
  mongoose.Promise = global.Promise
4
4
 
5
- let BeaconModel = require('../../../Models').Beacon(mongoose)
5
+ let BeaconModel = require('../../Models').Beacon(mongoose)
6
6
  let testCase = require('mocha').describe
7
7
  let assertions = require('mocha').it
8
8
  let chai = require('chai')
@@ -24,6 +24,7 @@
24
24
  "url": "https://www.google.com"
25
25
  }
26
26
  ],
27
+ "beacons": [],
27
28
  "filters": [
28
29
  {
29
30
  "type" : "calendarDateRange",
@@ -42,7 +43,8 @@
42
43
  "phone": 123123123123,
43
44
  "minor": 56466,
44
45
  "txPower": -77,
45
- "macAddress": "01:17:c5:31:84:19"
46
+ "macAddress": "01:17:c5:31:84:19",
47
+ "accountId": "90a2ed18-86be-48e7-948b-393b8b679ef6"
46
48
  },{
47
49
  "type": "circle",
48
50
  "name": "Test Circle",
package/models/Beacon.js CHANGED
@@ -42,14 +42,9 @@ let schema = {
42
42
 
43
43
  let BeaconSchema = new mongoose.Schema(schema)
44
44
 
45
- BeaconSchema.add({
46
- type:
47
- {type: String, required: true}
48
- })
49
-
50
45
  // mongoose validator helper plugin
51
46
  BeaconSchema.post('validate', function (doc) {
52
- console.debug('Beacon Schema post validate hook')
47
+ // Beacon Schema post validate hook
53
48
  this.lastUpdateTime = Date.now()
54
49
  Object.assign(this.errors || {}, this.errors || {}, this.customErrors)
55
50
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluedot-innovation/models",
3
- "version": "2.0.0-beta.13",
3
+ "version": "2.0.0-beta.15",
4
4
  "description": "",
5
5
  "main": "Models.js",
6
6
  "scripts": {