@dhyasama/totem-models 11.103.0 → 11.104.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/Meeting.js +1 -4
- package/package.json +1 -1
package/lib/Meeting.js
CHANGED
|
@@ -132,7 +132,7 @@ module.exports = function(mongoose, config) {
|
|
|
132
132
|
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
-
Meeting.statics.getMostRecent = function getMostRecent(customerId, personIds,
|
|
135
|
+
Meeting.statics.getMostRecent = function getMostRecent(customerId, personIds, cb) {
|
|
136
136
|
|
|
137
137
|
// Gets the most recent meeting with a customer across a list of people
|
|
138
138
|
// Typically used to get the last meeting the firm had with an org
|
|
@@ -155,9 +155,6 @@ module.exports = function(mongoose, config) {
|
|
|
155
155
|
// only meetings that have already started
|
|
156
156
|
query.where('startOn').lte(new Date());
|
|
157
157
|
|
|
158
|
-
// Optionally limit to meetings newer than timestamp (useful for seeing if anything since a previous event)
|
|
159
|
-
if (timestamp) query.where('startOn').gt(timestamp);
|
|
160
|
-
|
|
161
158
|
query.sort({ 'startOn': -1 });
|
|
162
159
|
query.limit(1);
|
|
163
160
|
|