summaryrefslogtreecommitdiffstats
path: root/models/cardComments.js
diff options
context:
space:
mode:
authorfmonthel <fmonthel@flox-arts.net>2016-11-17 21:23:39 -0500
committerfmonthel <fmonthel@flox-arts.net>2016-11-17 21:23:39 -0500
commitf71d2538fa15c9d8eb915d7b4dd9eb6a337d203d (patch)
treececd4c9ee118c146a11de4533d4e57eecde866f1 /models/cardComments.js
parentd11f069b6076de8b81d8228f76a8cf0012f8ffad (diff)
downloadwekan-f71d2538fa15c9d8eb915d7b4dd9eb6a337d203d.tar.gz
wekan-f71d2538fa15c9d8eb915d7b4dd9eb6a337d203d.tar.bz2
wekan-f71d2538fa15c9d8eb915d7b4dd9eb6a337d203d.zip
[ENH] Add index on CardId into Comments collection
Diffstat (limited to 'models/cardComments.js')
-rw-r--r--models/cardComments.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/models/cardComments.js b/models/cardComments.js
index ccad14f7..2cadb65e 100644
--- a/models/cardComments.js
+++ b/models/cardComments.js
@@ -57,10 +57,10 @@ CardComments.helpers({
CardComments.hookOptions.after.update = { fetchPrevious: false };
if (Meteor.isServer) {
- // Comments are often fetched within a card, so we create an index to make these
- // queries more efficient.
- Meteor.startup(() => {
- CardComments._collection._ensureIndex({ cardId: 1, createdAt: -1 });
+ // Comments are often fetched within a card, so we create an index to make these
+ // queries more efficient.
+ Meteor.startup(() => {
+ CardComments._collection._ensureIndex({ cardId: 1, createdAt: -1 });
});
CardComments.after.insert((userId, doc) => {