mirror of
https://github.com/plankanban/planka.git
synced 2025-12-18 01:11:13 +03:00
Add phone and organization fields to user
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user