mirror of
https://github.com/wekan/wekan.git
synced 2026-01-01 15:18:49 +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,7 +1,5 @@
|
|||
Avatars = new FS.Collection('avatars', {
|
||||
stores: [
|
||||
new FS.Store.GridFS('avatars'),
|
||||
],
|
||||
stores: [new FS.Store.GridFS('avatars')],
|
||||
filter: {
|
||||
maxSize: 72000,
|
||||
allow: {
|
||||
|
|
@ -18,10 +16,14 @@ Avatars.allow({
|
|||
insert: isOwner,
|
||||
update: isOwner,
|
||||
remove: isOwner,
|
||||
download() { return true; },
|
||||
download() {
|
||||
return true;
|
||||
},
|
||||
fetch: ['userId'],
|
||||
});
|
||||
|
||||
Avatars.files.before.insert((userId, doc) => {
|
||||
doc.userId = userId;
|
||||
});
|
||||
|
||||
export default Avatars;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue