mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 17:23:25 +03:00
Fix api transformers, intercept by error message instead of undefined
This commit is contained in:
@@ -25,7 +25,9 @@ module.exports = {
|
||||
email: inputs.values.email.toLowerCase(),
|
||||
password: bcrypt.hashSync(inputs.values.password, 10)
|
||||
})
|
||||
.intercept(undefined, 'conflict')
|
||||
.intercept({
|
||||
message: 'Unexpected error from database adapter: conflicting key value violates exclusion constraint "user_email_unique"'
|
||||
}, 'conflict')
|
||||
.fetch();
|
||||
|
||||
const userIds = await sails.helpers.getAdminUserIds();
|
||||
|
||||
Reference in New Issue
Block a user