mirror of
https://github.com/wekan/wekan.git
synced 2025-12-24 03:10:12 +01:00
Add createdAt and modifiedAt to all collections
This commit is contained in:
parent
fb728baf0c
commit
c60e80d25b
37 changed files with 3722 additions and 2168 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue