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:
parent
c4acb3eb24
commit
f3e0cadca6
11 changed files with 102 additions and 13 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue