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

@ -30,6 +30,16 @@ module.exports = {
regex: /^[a-zA-Z0-9]+(_?[a-zA-Z0-9])*$/,
allowNull: true,
},
phone: {
type: 'string',
isNotEmptyString: true,
allowNull: true,
},
organization: {
type: 'string',
isNotEmptyString: true,
allowNull: true,
},
},
exits: {
@ -42,7 +52,14 @@ module.exports = {
},
async fn(inputs, exits) {
const values = _.pick(inputs, ['email', 'password', 'name', 'username']);
const values = _.pick(inputs, [
'email',
'password',
'name',
'username',
'phone',
'organization',
]);
const user = await sails.helpers
.createUser(values, this.req)