diff options
author | Xavier Priour <xavier.priour@bubblyware.com> | 2015-12-16 16:30:48 +0100 |
---|---|---|
committer | Xavier Priour <xavier.priour@bubblyware.com> | 2015-12-16 16:30:48 +0100 |
commit | efe7c21d579a0cffe682741d2daf832062001a3a (patch) | |
tree | 6169edeed16bf510b77ba4ff58d19669297d2dfb /models/export.js | |
parent | 0608b90d3b46d4e9f98518a3e8775fd8048a27ec (diff) | |
download | wekan-efe7c21d579a0cffe682741d2daf832062001a3a.tar.gz wekan-efe7c21d579a0cffe682741d2daf832062001a3a.tar.bz2 wekan-efe7c21d579a0cffe682741d2daf832062001a3a.zip |
Export wekan: do not export board.stars
Diffstat (limited to 'models/export.js')
-rw-r--r-- | models/export.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/models/export.js b/models/export.js index efff7642..aab81c64 100644 --- a/models/export.js +++ b/models/export.js @@ -20,12 +20,13 @@ class Exporter { build() { const byBoard = {boardId: this._boardId}; - const fields = {fields: {boardId: 0}}; - const result = Boards.findOne(this._boardId); - result.lists = Lists.find(byBoard, fields).fetch(); - result.cards = Cards.find(byBoard, fields).fetch(); - result.comments = CardComments.find(byBoard, fields).fetch(); - result.activities = Activities.find(byBoard, fields).fetch(); + // we do not want to retrieve boardId in related elements + const noBoardId = {fields: {boardId: 0}}; + const result = Boards.findOne(this._boardId, {fields: {stars: 0}}); + result.lists = Lists.find(byBoard, noBoardId).fetch(); + result.cards = Cards.find(byBoard, noBoardId).fetch(); + result.comments = CardComments.find(byBoard, noBoardId).fetch(); + result.activities = Activities.find(byBoard, noBoardId).fetch(); // we also have to export some user data - as the other elements only include id // but we have to be careful: |