mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
ref: Remove board types, refactoring
This commit is contained in:
parent
d39da61295
commit
5cd025ffb7
182 changed files with 1573 additions and 1239 deletions
|
@ -9,6 +9,8 @@ const Errors = {
|
|||
},
|
||||
};
|
||||
|
||||
const passwordValidator = (value) => zxcvbn(value).score >= 2; // TODO: move to config
|
||||
|
||||
module.exports = {
|
||||
inputs: {
|
||||
email: {
|
||||
|
@ -18,7 +20,7 @@ module.exports = {
|
|||
},
|
||||
password: {
|
||||
type: 'string',
|
||||
custom: (value) => zxcvbn(value).score >= 2, // TODO: move to config
|
||||
custom: passwordValidator,
|
||||
required: true,
|
||||
},
|
||||
name: {
|
||||
|
@ -74,8 +76,11 @@ module.exports = {
|
|||
'subscribeToOwnCards',
|
||||
]);
|
||||
|
||||
const user = await sails.helpers.users
|
||||
.createOne(values, this.req)
|
||||
const user = await sails.helpers.users.createOne
|
||||
.with({
|
||||
values,
|
||||
request: this.req,
|
||||
})
|
||||
.intercept('emailAlreadyInUse', () => Errors.EMAIL_ALREADY_IN_USE)
|
||||
.intercept('usernameAlreadyInUse', () => Errors.USERNAME_ALREADY_IN_USE);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue