From e5995477b80a3c8e9fd423d14fd818a5b3ad5aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Manelli?= Date: Mon, 16 Apr 2018 14:33:53 -0300 Subject: Fix #1567 --- models/users.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'models/users.js') diff --git a/models/users.js b/models/users.js index da8ca77c..41179875 100644 --- a/models/users.js +++ b/models/users.js @@ -43,7 +43,9 @@ Users.attachSchema(new SimpleSchema({ optional: true, autoValue() { // eslint-disable-line consistent-return if (this.isInsert && !this.isSet) { - return {}; + return { + boardView: 'board-view-lists', + }; } }, }, @@ -95,6 +97,10 @@ Users.attachSchema(new SimpleSchema({ type: String, optional: true, }, + 'profile.boardView': { + type: String, + optional: true, + }, services: { type: Object, optional: true, @@ -329,6 +335,14 @@ Users.mutations({ setShowCardsCountAt(limit) { return {$set: {'profile.showCardsCountAt': limit}}; }, + + setBoardView(view) { + return { + $set : { + 'profile.boardView': view, + }, + }; + }, }); Meteor.methods({ -- cgit v1.2.3-1-g7c22