@dhyasama/totem-models 1.13.3 → 1.14.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/Organization.js +8 -0
- package/package.json +1 -1
package/lib/Organization.js
CHANGED
|
@@ -619,6 +619,14 @@ module.exports = function(mongoose, config) {
|
|
|
619
619
|
|
|
620
620
|
};
|
|
621
621
|
|
|
622
|
+
Organization.statics.findByLimitedPartner = function findByLimitedPartner(lpid, cb) {
|
|
623
|
+
var self = this;
|
|
624
|
+
self
|
|
625
|
+
.find({ 'lps': lpid, 'deleted': {$ne: true} })
|
|
626
|
+
.select('name logoUrl')
|
|
627
|
+
.exec(cb);
|
|
628
|
+
};
|
|
629
|
+
|
|
622
630
|
Organization.statics.findByPerson = function findByPerson(personId, cb) {
|
|
623
631
|
|
|
624
632
|
// Given a person id, get all organizations with that person
|