@dhyasama/totem-models 8.12.0 → 8.13.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/Financials.js +1 -4
- package/lib/Organization.js +1 -1
- package/package.json +1 -1
package/lib/Financials.js
CHANGED
|
@@ -209,20 +209,17 @@ module.exports = function(mongoose, config) {
|
|
|
209
209
|
|
|
210
210
|
};
|
|
211
211
|
|
|
212
|
-
Financials.statics.getByUUID = function getByUUID(
|
|
212
|
+
Financials.statics.getByUUID = function getByUUID(uuid, cb) {
|
|
213
213
|
|
|
214
214
|
var self = this;
|
|
215
215
|
|
|
216
216
|
var query = self.findOne({
|
|
217
|
-
'customer': customerId,
|
|
218
217
|
'snapshots.uuid': uuid
|
|
219
218
|
});
|
|
220
219
|
|
|
221
220
|
query.populate('organization', 'name logoUrl');
|
|
222
|
-
query.populate('customer', 'name logoUrl customer.style');
|
|
223
221
|
query.populate({
|
|
224
222
|
path: 'snapshots.documents',
|
|
225
|
-
match: { customer: customerId }
|
|
226
223
|
});
|
|
227
224
|
|
|
228
225
|
query.exec(cb);
|
package/lib/Organization.js
CHANGED
|
@@ -1284,7 +1284,7 @@ module.exports = function(mongoose, config) {
|
|
|
1284
1284
|
|
|
1285
1285
|
};
|
|
1286
1286
|
|
|
1287
|
-
Organization.statics.findByTotemUrl = function
|
|
1287
|
+
Organization.statics.findByTotemUrl = function findByTotemUrl(url, cb) {
|
|
1288
1288
|
this.findOne({ 'customer.totemUrl': url }).exec(cb);
|
|
1289
1289
|
};
|
|
1290
1290
|
|