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 !
This commit is contained in:
Lauri Ojansivu 2020-04-28 03:24:18 +03:00
parent 280e66947e
commit 9ae20a3f51
4 changed files with 5433 additions and 257 deletions

View file

@ -1053,6 +1053,7 @@ Cards.helpers({
return Users.find({ _id: { $in: this.vote.positive } }); return Users.find({ _id: { $in: this.vote.positive } });
return []; return [];
}, },
voteMemberNegative() { voteMemberNegative() {
if (this.vote && this.vote.negative) if (this.vote && this.vote.negative)
return Users.find({ _id: { $in: this.vote.negative } }); return Users.find({ _id: { $in: this.vote.negative } });
@ -1475,12 +1476,12 @@ Cards.mutations({
}, },
}; };
}, },
setVoteQuestion(question, public) { setVoteQuestion(question, publicVote) {
return { return {
$set: { $set: {
vote: { vote: {
question, question,
public, public: publicVote,
positive: [], positive: [],
negative: [], negative: [],
}, },

View file

@ -531,7 +531,7 @@ Users.helpers({
getStartDayOfWeek() { getStartDayOfWeek() {
const profile = this.profile || {}; const profile = this.profile || {};
// default is 'Monday' (1) // default is 'Monday' (1)
return profile.startDayOfWeek ?? 1; return profile.startDayOfWeek || 1;
}, },
getTemplatesBoardId() { getTemplatesBoardId() {

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff