@dhyasama/totem-models 1.24.0 → 1.25.1
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/Organization.js +9 -0
- package/lib/Person.js +3 -0
- package/package.json +1 -1
- package/.npmignore +0 -14
package/lib/Organization.js
CHANGED
|
@@ -857,6 +857,15 @@ module.exports = function(mongoose, config) {
|
|
|
857
857
|
|
|
858
858
|
};
|
|
859
859
|
|
|
860
|
+
Organization.statics.getLpOrgs = function getLpOrgs(lpids, cb) {
|
|
861
|
+
var self = this;
|
|
862
|
+
self
|
|
863
|
+
.find({ 'lps': { $in : lpids }, 'deleted': {$ne: true} })
|
|
864
|
+
.select('name logoUrl lps')
|
|
865
|
+
.populate('lps', 'name customer')
|
|
866
|
+
.exec(cb);
|
|
867
|
+
};
|
|
868
|
+
|
|
860
869
|
Organization.statics.getNotes = function getNotes(orgid, cb) {
|
|
861
870
|
|
|
862
871
|
var self = this;
|
package/lib/Person.js
CHANGED
package/package.json
CHANGED