@dhyasama/totem-models 12.17.2 → 12.18.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
@@ -30,7 +30,7 @@ module.exports = function(mongoose, config) {
30
30
 
31
31
  updatedOn: { type: Date, index: false, required: true },
32
32
 
33
- raw: { type: String, index: false, required: true },
33
+ raw: { type: String, index: false, required: true, select: false },
34
34
 
35
35
  people: [{ type: Schema.ObjectId, ref: 'Person', index: true }],
36
36
 
@@ -52,10 +52,6 @@ module.exports = function(mongoose, config) {
52
52
 
53
53
  });
54
54
 
55
- Meeting.virtual('original').get(function () {
56
- try { return JSON.parse(this.raw); } catch (e) { return null; }
57
- });
58
-
59
55
  Meeting.statics.getById = function (id, options, cb) {
60
56
 
61
57
  const run = async () => {
@@ -68,7 +64,7 @@ module.exports = function(mongoose, config) {
68
64
  let query = this.findOne({ '_id': id, customer: options.CUSTOMER_ID });
69
65
  if (options.populate === true) { query.populate({ path: 'people', select: 'name title avatarUrl doNotDisplay' }); }
70
66
 
71
- const result = await query.lean({ virtuals: true });
67
+ const result = await query.lean();
72
68
  return result;
73
69
  };
74
70
 
@@ -88,7 +84,7 @@ module.exports = function(mongoose, config) {
88
84
  let query = this.find({ 'eventId': eventId, customer: options.CUSTOMER_ID });
89
85
  if (options.populate === true) { query.populate({ path: 'people', select: 'name title avatarUrl doNotDisplay' }); }
90
86
 
91
- const result = await query.lean({ virtuals: true });
87
+ const result = await query.lean();
92
88
  return result;
93
89
  };
94
90
 
@@ -108,7 +104,7 @@ module.exports = function(mongoose, config) {
108
104
  let query = this.findOne({ 'uniqueId': uniqueId, customer: options.CUSTOMER_ID });
109
105
  if (options.populate === true) { query.populate({ path: 'people', select: 'name title avatarUrl doNotDisplay' }); }
110
106
 
111
- const result = await query.lean({ virtuals: true });
107
+ const result = await query.lean();
112
108
  return result;
113
109
  };
114
110
 
@@ -143,7 +139,7 @@ module.exports = function(mongoose, config) {
143
139
 
144
140
  if (options.populate === true) { query.populate({ path: 'people', select: 'name title avatarUrl doNotDisplay' }); }
145
141
 
146
- const result = await query.lean({ virtuals: true });
142
+ const result = await query.lean();
147
143
  return result;
148
144
  };
149
145
 
package/lib/Rate.js CHANGED
@@ -59,7 +59,7 @@ module.exports = function(mongoose, config) {
59
59
  throw new Error('rate.date and rate.currency are required');
60
60
  }
61
61
 
62
- const { _id, ...update } = data;
62
+ const { _id, __v, ...update } = data;
63
63
  return await this.findOneAndUpdate(
64
64
  { date: data.date, currency: data.currency },
65
65
  { $set: update },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhyasama/totem-models",
3
- "version": "12.17.2",
3
+ "version": "12.18.0",
4
4
  "author": "Jason Reynolds",
5
5
  "license": "UNLICENSED",
6
6
  "description": "Models for Totem platform",