@dhyasama/totem-models 8.2.0 → 8.3.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/Account.js +17 -0
- package/package.json +1 -1
package/lib/Account.js
CHANGED
|
@@ -183,6 +183,23 @@ module.exports = function(mongoose, config) {
|
|
|
183
183
|
|
|
184
184
|
};
|
|
185
185
|
|
|
186
|
+
Account.statics.listAllAccountsSkinny = function (options, cb) {
|
|
187
|
+
|
|
188
|
+
const self = this;
|
|
189
|
+
|
|
190
|
+
if (!cb) { throw new Error('cb is required'); }
|
|
191
|
+
|
|
192
|
+
options = helpers.getDefaultOptions(options);
|
|
193
|
+
|
|
194
|
+
if (!options.isWorkerProcess) { return cb(null, []); }
|
|
195
|
+
|
|
196
|
+
self
|
|
197
|
+
.find({'active': true})
|
|
198
|
+
.select('active email auth')
|
|
199
|
+
.exec(cb);
|
|
200
|
+
|
|
201
|
+
};
|
|
202
|
+
|
|
186
203
|
Account.statics.listGoogleAccounts = function(options, cb) {
|
|
187
204
|
|
|
188
205
|
// This is only for worker
|