@dhyasama/totem-models 8.8.3 → 8.8.4

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/lib/Interaction.js +5 -11
  2. package/package.json +1 -1
@@ -28,20 +28,14 @@ module.exports = function(mongoose, config) {
28
28
 
29
29
  ///////////////////////////////////////
30
30
 
31
- Interaction.statics.addNote = function(interactionId, creatorPersonId, text, isPrivate, cb) {
31
+ Interaction.statics.addNote = function(interactionId, creatorPersonId, text, isPrivate, customerId cb) {
32
32
 
33
- if (!cb) { throw new Error('cb is required'); }
34
- if (!interactionId) { return cb(new Error('interactionId is required'), null); }
35
- if (!mongoose.Types.ObjectId.isValid(interactionId)) { return cb(new Error('interactionId is not a valid ObjectId'), null); }
36
- if (!creatorPersonId) { return cb(new Error('creatorPersonId is required'), null); }
37
- if (!mongoose.Types.ObjectId.isValid(creatorPersonId)) { return cb(new Error('creatorPersonId is not a valid ObjectId'), null); }
38
- if (!text) { return cb(new Error('text is required'), null); }
39
-
40
- Note.createForModel({
33
+ Interaction.createForModel({
41
34
  createdBy: creatorPersonId,
42
35
  text: text,
43
- isPrivate: isPrivate
44
- }, this, interactionId, cb);
36
+ isPrivate: isPrivate,
37
+ customer: customerId
38
+ }, this, interactonid, cb);
45
39
 
46
40
  };
47
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "8.8.3",
3
+ "version": "8.8.4",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",