summaryrefslogtreecommitdiffstats
path: root/models/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/users.js')
-rw-r--r--models/users.js82
1 files changed, 41 insertions, 41 deletions
diff --git a/models/users.js b/models/users.js
index 87f2b860..9bc4f175 100644
--- a/models/users.js
+++ b/models/users.js
@@ -358,11 +358,11 @@ Users.helpers({
},
getTemplatesBoardId() {
- return this.profile.templatesBoardId;
+ return this.profile.templatesBoardId;
},
getTemplatesBoardSlug() {
- return Boards.findOne(this.profile.templatesBoardId).slug;
+ return Boards.findOne(this.profile.templatesBoardId).slug;
},
});
@@ -741,47 +741,47 @@ if (Meteor.isServer) {
Boards.insert({
title: TAPi18n.__('templates'),
permission: 'private',
- type: 'template-container'
+ type: 'template-container',
}, fakeUser, (err, boardId) => {
- // Insert the reference to our templates board
- Users.update(fakeUserId.get(), {$set: {'profile.templatesBoardId': boardId}});
-
- // Insert the card templates swimlane
- Swimlanes.insert({
- title: TAPi18n.__('card-templates-swimlane'),
- boardId,
- sort: 1,
- type: 'template-container',
- }, fakeUser, (err, swimlaneId) => {
-
- // Insert the reference to out card templates swimlane
- Users.update(fakeUserId.get(), {$set: {'profile.cardTemplatesSwimlaneId': swimlaneId}});
- });
-
- // Insert the list templates swimlane
- Swimlanes.insert({
- title: TAPi18n.__('list-templates-swimlane'),
- boardId,
- sort: 2,
- type: 'template-container',
- }, fakeUser, (err, swimlaneId) => {
-
- // Insert the reference to out list templates swimlane
- Users.update(fakeUserId.get(), {$set: {'profile.listTemplatesSwimlaneId': swimlaneId}});
- });
-
- // Insert the board templates swimlane
- Swimlanes.insert({
- title: TAPi18n.__('board-templates-swimlane'),
- boardId,
- sort: 3,
- type: 'template-container',
- }, fakeUser, (err, swimlaneId) => {
-
- // Insert the reference to out board templates swimlane
- Users.update(fakeUserId.get(), {$set: {'profile.boardTemplatesSwimlaneId': swimlaneId}});
- });
+ // Insert the reference to our templates board
+ Users.update(fakeUserId.get(), {$set: {'profile.templatesBoardId': boardId}});
+
+ // Insert the card templates swimlane
+ Swimlanes.insert({
+ title: TAPi18n.__('card-templates-swimlane'),
+ boardId,
+ sort: 1,
+ type: 'template-container',
+ }, fakeUser, (err, swimlaneId) => {
+
+ // Insert the reference to out card templates swimlane
+ Users.update(fakeUserId.get(), {$set: {'profile.cardTemplatesSwimlaneId': swimlaneId}});
+ });
+
+ // Insert the list templates swimlane
+ Swimlanes.insert({
+ title: TAPi18n.__('list-templates-swimlane'),
+ boardId,
+ sort: 2,
+ type: 'template-container',
+ }, fakeUser, (err, swimlaneId) => {
+
+ // Insert the reference to out list templates swimlane
+ Users.update(fakeUserId.get(), {$set: {'profile.listTemplatesSwimlaneId': swimlaneId}});
+ });
+
+ // Insert the board templates swimlane
+ Swimlanes.insert({
+ title: TAPi18n.__('board-templates-swimlane'),
+ boardId,
+ sort: 3,
+ type: 'template-container',
+ }, fakeUser, (err, swimlaneId) => {
+
+ // Insert the reference to out board templates swimlane
+ Users.update(fakeUserId.get(), {$set: {'profile.boardTemplatesSwimlaneId': swimlaneId}});
+ });
});
});
});