From c60e80d25baa6a81b28f6090ca848553d20b2bb7 Mon Sep 17 00:00:00 2001 From: Justin Reynolds Date: Wed, 26 Jun 2019 17:47:27 -0500 Subject: Add createdAt and modifiedAt to all collections --- models/attachments.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'models/attachments.js') diff --git a/models/attachments.js b/models/attachments.js index 71b30eee..893b5aca 100644 --- a/models/attachments.js +++ b/models/attachments.js @@ -1,6 +1,5 @@ Attachments = new FS.Collection('attachments', { stores: [ - // XXX Add a new store for cover thumbnails so we don't load big images in // the general board view new FS.Store.GridFS('attachments', { @@ -25,7 +24,6 @@ Attachments = new FS.Collection('attachments', { ], }); - if (Meteor.isServer) { Meteor.startup(() => { Attachments.files._ensureIndex({ cardId: 1 }); @@ -78,13 +76,16 @@ if (Meteor.isServer) { } else { // Don't add activity about adding the attachment as the activity // be imported and delete source field - Attachments.update({ - _id: doc._id, - }, { - $unset: { - source: '', + Attachments.update( + { + _id: doc._id, }, - }); + { + $unset: { + source: '', + }, + } + ); } }); @@ -107,3 +108,5 @@ if (Meteor.isServer) { }); }); } + +export default Attachments; -- cgit v1.2.3-1-g7c22