summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-04-28 03:24:18 +0300
committerLauri Ojansivu <x@xet7.org>2020-04-28 03:24:18 +0300
commit9ae20a3f51e63c29f536e2f5b3e66a2c7d88c691 (patch)
treedd0199e6caac8e7891288977687454e30155f0ae /models
parent280e66947e3afa878c41e876cf827ebcec81a2c6 (diff)
downloadwekan-9ae20a3f51e63c29f536e2f5b3e66a2c7d88c691.tar.gz
wekan-9ae20a3f51e63c29f536e2f5b3e66a2c7d88c691.tar.bz2
wekan-9ae20a3f51e63c29f536e2f5b3e66a2c7d88c691.zip
Fix Cards and Users docs not generated because of syntax error and new Javascript syntax.
Wekan uses wekan/releases/generate-docs*.sh Python code to generate OpenAPI docs, it did not show any errors while generating docs, only left out parts of API docs. Thanks to pvcon13 and xet7 !
Diffstat (limited to 'models')
-rw-r--r--models/cards.js5
-rw-r--r--models/users.js2
2 files changed, 4 insertions, 3 deletions
diff --git a/models/cards.js b/models/cards.js
index 72153132..4197f7ab 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -1053,6 +1053,7 @@ Cards.helpers({
return Users.find({ _id: { $in: this.vote.positive } });
return [];
},
+
voteMemberNegative() {
if (this.vote && this.vote.negative)
return Users.find({ _id: { $in: this.vote.negative } });
@@ -1475,12 +1476,12 @@ Cards.mutations({
},
};
},
- setVoteQuestion(question, public) {
+ setVoteQuestion(question, publicVote) {
return {
$set: {
vote: {
question,
- public,
+ public: publicVote,
positive: [],
negative: [],
},
diff --git a/models/users.js b/models/users.js
index ebb14f5f..2d84141c 100644
--- a/models/users.js
+++ b/models/users.js
@@ -531,7 +531,7 @@ Users.helpers({
getStartDayOfWeek() {
const profile = this.profile || {};
// default is 'Monday' (1)
- return profile.startDayOfWeek ?? 1;
+ return profile.startDayOfWeek || 1;
},
getTemplatesBoardId() {