@dhyasama/totem-models 11.109.0 → 11.111.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 CHANGED
@@ -83,7 +83,7 @@ module.exports = function(mongoose, config) {
83
83
  if (!options.CUSTOMER_ID) { return cb(new Error('options.CUSTOMER_ID is required'), null); }
84
84
  if (!mongoose.Types.ObjectId.isValid(options.CUSTOMER_ID)) { return cb(new Error('options.CUSTOMER_ID is not a valid ObjectId'), null); }
85
85
 
86
- let query = self.findOne({ 'eventId': eventId, customer: options.CUSTOMER_ID });
86
+ let query = self.find({ 'eventId': eventId, customer: options.CUSTOMER_ID });
87
87
  if (options.populate === true) { query.populate({ path: 'people', select: 'name title avatarUrl doNotDisplay' }); }
88
88
  query.exec(cb);
89
89
 
@@ -105,7 +105,7 @@ module.exports = function(mongoose, config) {
105
105
 
106
106
  };
107
107
 
108
- Meeting.statics.find = function (options, cb) {
108
+ Meeting.statics.search = function (options, cb) {
109
109
 
110
110
  const self = this;
111
111
 
@@ -119,7 +119,7 @@ module.exports = function(mongoose, config) {
119
119
  options.before = options.before || moment().toISOString();
120
120
  options.after = options.after || moment().subtract(20, 'year').toISOString();
121
121
 
122
- let query = mongoose.Model.find.call(self, { customer: options.CUSTOMER_ID });
122
+ let query = self.find({ customer: options.CUSTOMER_ID });
123
123
 
124
124
  if (options && Array.isArray(options.personIds) && options.personIds.length > 0) {
125
125
  query.where({ 'people': { $in: options.personIds } });
package/lib/Person.js CHANGED
@@ -101,16 +101,6 @@ module.exports = function(mongoose, config) {
101
101
  // customer specific (customer id is stored on doc)
102
102
  documents: [ { type: Schema.ObjectId, ref: 'Document' } ],
103
103
 
104
- // this only relates to access for lps
105
- syndication: {
106
- notify: { type: Boolean, default: false }
107
- },
108
-
109
- // this only relates to access for lps
110
- subscriptions: [{ id: { type: Schema.ObjectId, required: false, default: null }}],
111
-
112
- account: { type: Schema.ObjectId, ref: 'Account', required: false },
113
-
114
104
  entered: {
115
105
  by: { type: String, default: null, trim: true },
116
106
  on: { type: Date, default: Date.now }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "11.109.0",
3
+ "version": "11.111.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",