1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 05:09:43 +02:00

Add preferences tab to user settings, add subscribe to own cards option

This commit is contained in:
Maksim Eltyshev 2020-04-10 00:11:34 +05:00
parent f3e0cadca6
commit 6a82448dc7
13 changed files with 96 additions and 2 deletions

View file

@ -40,6 +40,9 @@ module.exports = {
isNotEmptyString: true,
allowNull: true,
},
subscribeToOwnCards: {
type: 'boolean',
},
},
exits: {
@ -59,6 +62,7 @@ module.exports = {
'username',
'phone',
'organization',
'subscribeToOwnCards',
]);
const user = await sails.helpers

View file

@ -32,6 +32,9 @@ module.exports = {
isNotEmptyString: true,
allowNull: true,
},
subscribeToOwnCards: {
type: 'boolean',
},
},
exits: {
@ -57,7 +60,14 @@ module.exports = {
throw Errors.USER_NOT_FOUND;
}
const values = _.pick(inputs, ['isAdmin', 'name', 'avatar', 'phone', 'organization']);
const values = _.pick(inputs, [
'isAdmin',
'name',
'avatar',
'phone',
'organization',
'subscribeToOwnCards',
]);
user = await sails.helpers.updateUser(user, values, this.req);