@dhyasama/totem-models 12.17.3 → 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 +5 -9
- package/package.json +1 -1
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(
|
|
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(
|
|
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(
|
|
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(
|
|
142
|
+
const result = await query.lean();
|
|
147
143
|
return result;
|
|
148
144
|
};
|
|
149
145
|
|