1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 20:59:44 +02:00

Add phone and organization fields to user

This commit is contained in:
Maksim Eltyshev 2020-04-09 18:27:28 +05:00
parent c4acb3eb24
commit f3e0cadca6
11 changed files with 102 additions and 13 deletions

View file

@ -22,6 +22,16 @@ module.exports = {
type: 'json',
custom: (value) => _.isNull(value),
},
phone: {
type: 'string',
isNotEmptyString: true,
allowNull: true,
},
organization: {
type: 'string',
isNotEmptyString: true,
allowNull: true,
},
},
exits: {
@ -47,7 +57,7 @@ module.exports = {
throw Errors.USER_NOT_FOUND;
}
const values = _.pick(inputs, ['isAdmin', 'name', 'avatar']);
const values = _.pick(inputs, ['isAdmin', 'name', 'avatar', 'phone', 'organization']);
user = await sails.helpers.updateUser(user, values, this.req);