@dhyasama/totem-models 8.5.5 → 8.6.0
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/lib/Interaction.js +2 -2
- package/lib/Message.js +2 -2
- package/lib/Organization.js +2 -2
- package/lib/Person.js +2 -2
- package/package.json +1 -1
package/lib/Interaction.js
CHANGED
|
@@ -62,7 +62,7 @@ module.exports = function(mongoose, config) {
|
|
|
62
62
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
Interaction.statics.deleteNote = function(noteId, cb) {
|
|
65
|
+
Interaction.statics.deleteNote = function(noteId, customerId, cb) {
|
|
66
66
|
|
|
67
67
|
// Delete the note itself along with any references
|
|
68
68
|
|
|
@@ -79,7 +79,7 @@ module.exports = function(mongoose, config) {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
async.series([
|
|
82
|
-
Note.delete.bind(Note, noteId),
|
|
82
|
+
Note.delete.bind(Note, noteId, customerId),
|
|
83
83
|
removeReferences
|
|
84
84
|
], function(err, results) {
|
|
85
85
|
return cb(err, null);
|
package/lib/Message.js
CHANGED
|
@@ -96,7 +96,7 @@ module.exports = function(mongoose, config) {
|
|
|
96
96
|
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
Message.statics.deleteNote = function(noteId, cb) {
|
|
99
|
+
Message.statics.deleteNote = function(noteId, customerId, cb) {
|
|
100
100
|
|
|
101
101
|
// Delete the note itself along with any references
|
|
102
102
|
|
|
@@ -109,7 +109,7 @@ module.exports = function(mongoose, config) {
|
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
async.series([
|
|
112
|
-
Note.delete.bind(Note, noteId),
|
|
112
|
+
Note.delete.bind(Note, noteId, customerId),
|
|
113
113
|
removeReferences
|
|
114
114
|
], function(err, results) {
|
|
115
115
|
return cb(err, null);
|
package/lib/Organization.js
CHANGED
|
@@ -1032,7 +1032,7 @@ module.exports = function(mongoose, config) {
|
|
|
1032
1032
|
|
|
1033
1033
|
};
|
|
1034
1034
|
|
|
1035
|
-
Organization.statics.deleteNote = function(noteId, cb) {
|
|
1035
|
+
Organization.statics.deleteNote = function(noteId, customerId, cb) {
|
|
1036
1036
|
|
|
1037
1037
|
// Delete the note itself along with any references
|
|
1038
1038
|
|
|
@@ -1045,7 +1045,7 @@ module.exports = function(mongoose, config) {
|
|
|
1045
1045
|
};
|
|
1046
1046
|
|
|
1047
1047
|
async.series([
|
|
1048
|
-
Note.delete.bind(Note, noteId),
|
|
1048
|
+
Note.delete.bind(Note, noteId, customerId),
|
|
1049
1049
|
removeReferences
|
|
1050
1050
|
], function(err, results) {
|
|
1051
1051
|
return cb(err, null);
|
package/lib/Person.js
CHANGED
|
@@ -288,7 +288,7 @@ module.exports = function(mongoose, config) {
|
|
|
288
288
|
|
|
289
289
|
};
|
|
290
290
|
|
|
291
|
-
Person.statics.deleteNote = function(noteId, cb) {
|
|
291
|
+
Person.statics.deleteNote = function(noteId, customerId, cb) {
|
|
292
292
|
|
|
293
293
|
// Delete the note itself along with any references on people
|
|
294
294
|
|
|
@@ -301,7 +301,7 @@ module.exports = function(mongoose, config) {
|
|
|
301
301
|
};
|
|
302
302
|
|
|
303
303
|
async.series([
|
|
304
|
-
Note.delete.bind(Note, noteId),
|
|
304
|
+
Note.delete.bind(Note, noteId, customerId),
|
|
305
305
|
removePersonNoteReferences
|
|
306
306
|
], function(err, results) {
|
|
307
307
|
return cb(err, null);
|