summaryrefslogtreecommitdiffstats
path: root/models/cardComments.js
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2019-02-23 16:36:29 +0100
committerAndrés Manelli <andresmanelli@gmail.com>2019-02-24 00:05:00 +0100
commit0fec7115451ba3b49442965c8160df4911157601 (patch)
tree12364d6c96f0900aea318b16863a246b6c6dd9ee /models/cardComments.js
parent7a6afb8aea2c3398ec0fe34d664398bd94cac90a (diff)
downloadwekan-0fec7115451ba3b49442965c8160df4911157601.tar.gz
wekan-0fec7115451ba3b49442965c8160df4911157601.tar.bz2
wekan-0fec7115451ba3b49442965c8160df4911157601.zip
Prepare to create card from template
Diffstat (limited to 'models/cardComments.js')
-rw-r--r--models/cardComments.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/cardComments.js b/models/cardComments.js
index 974c5ec9..f29366a5 100644
--- a/models/cardComments.js
+++ b/models/cardComments.js
@@ -67,6 +67,12 @@ CardComments.allow({
});
CardComments.helpers({
+ copy(newCardId) {
+ this.cardId = newCardId;
+ this._id = null;
+ CardComments.insert(this);
+ },
+
user() {
return Users.findOne(this.userId);
},