summaryrefslogtreecommitdiffstats
path: root/models/attachments.js
diff options
context:
space:
mode:
authorJustin Reynolds <justinr1234@gmail.com>2019-06-26 17:47:27 -0500
committerJustin Reynolds <justinr1234@gmail.com>2019-06-27 09:13:20 -0500
commitc60e80d25baa6a81b28f6090ca848553d20b2bb7 (patch)
tree64bcea66932f4b4635d5df6901f18d5ba6db0a37 /models/attachments.js
parentfb728baf0c87bae5fa39d92089b667ff1ed69fa6 (diff)
downloadwekan-c60e80d25baa6a81b28f6090ca848553d20b2bb7.tar.gz
wekan-c60e80d25baa6a81b28f6090ca848553d20b2bb7.tar.bz2
wekan-c60e80d25baa6a81b28f6090ca848553d20b2bb7.zip
Add createdAt and modifiedAt to all collections
Diffstat (limited to 'models/attachments.js')
-rw-r--r--models/attachments.js19
1 files changed, 11 insertions, 8 deletions
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;