mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Fixes #2596 incorrect date types for created & updated
This commit is contained in:
parent
2c78aab3dc
commit
3b9f2ca7c2
22 changed files with 103 additions and 33 deletions
|
|
@ -14,6 +14,16 @@ Actions.allow({
|
|||
},
|
||||
});
|
||||
|
||||
Actions.before.insert((userId, doc) => {
|
||||
doc.createdAt = new Date();
|
||||
doc.modifiedAt = doc.createdAt;
|
||||
});
|
||||
|
||||
Actions.before.update((userId, doc, fieldNames, modifier) => {
|
||||
modifier.$set = modifier.$set || {};
|
||||
modifier.$set.modifiedAt = new Date();
|
||||
});
|
||||
|
||||
Actions.helpers({
|
||||
description() {
|
||||
return this.desc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue