@dhyasama/totem-models 10.73.0 → 10.74.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 +14 -0
- package/package.json +1 -1
package/lib/Organization.js
CHANGED
|
@@ -1579,6 +1579,20 @@ module.exports = function(mongoose, config) {
|
|
|
1579
1579
|
|
|
1580
1580
|
};
|
|
1581
1581
|
|
|
1582
|
+
Organization.statics.getByIdSkinny = function getById(id, cb) {
|
|
1583
|
+
|
|
1584
|
+
const self = this;
|
|
1585
|
+
|
|
1586
|
+
if (!cb) { throw new Error('cb is required'); }
|
|
1587
|
+
if (!id) { return cb(new Error('id is required'), null); }
|
|
1588
|
+
|
|
1589
|
+
const query = self.findById(id);
|
|
1590
|
+
query.select('name aliases website websiteAliases');
|
|
1591
|
+
|
|
1592
|
+
return query.exec(cb);
|
|
1593
|
+
|
|
1594
|
+
};
|
|
1595
|
+
|
|
1582
1596
|
Organization.statics.getByIds = function getByIds(ids, options, cb) {
|
|
1583
1597
|
|
|
1584
1598
|
const self = this;
|