fh-wfm-mongoose-store
Advanced tools
Comparing version 0.4.4-pre.2 to 0.4.4-pre.3
@@ -98,4 +98,20 @@ 'use strict'; | ||
.on('delete', crudlFunctions.remove) | ||
.on('list', crudlFunctions.list); | ||
.on('list', function(filter) { | ||
filter = filter || {}; | ||
var _self = this; | ||
//(Optional) Different filters may require topic UIDs. | ||
//This can avoid the scenario where list done topics are publised with the | ||
//wrong results | ||
var topicUid = filter.topicUid; | ||
filter = _.omit(filter, 'topicUid'); | ||
crudlFunctions.list(filter).then(function(filteredList) { | ||
_self.mediator.publish(self.topics.getTopic('list', 'done', topicUid), filteredList); | ||
}).catch(function(err) { | ||
_self.mediator.publish(self.topics.getTopic('list', 'done', topicUid), err); | ||
}); | ||
}); | ||
console.log('listening for: ', this.topics.getTopic()); | ||
@@ -102,0 +118,0 @@ }; |
{ | ||
"name": "fh-wfm-mongoose-store", | ||
"version": "0.4.4-pre.2", | ||
"version": "0.4.4-pre.3", | ||
"description": "Direct mongoose storage", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38514
953