mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 17:23:25 +03:00
Fix updates of username and email
This commit is contained in:
@@ -69,7 +69,7 @@ module.exports = {
|
|||||||
const values = _.pick(inputs, ['email']);
|
const values = _.pick(inputs, ['email']);
|
||||||
|
|
||||||
user = await sails.helpers.users
|
user = await sails.helpers.users
|
||||||
.update(user, values, this.req)
|
.updateOne(user, values, this.req)
|
||||||
.intercept('emailAlreadyInUse', () => Errors.EMAIL_ALREADY_IN_USE);
|
.intercept('emailAlreadyInUse', () => Errors.EMAIL_ALREADY_IN_USE);
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ module.exports = {
|
|||||||
const values = _.pick(inputs, ['username']);
|
const values = _.pick(inputs, ['username']);
|
||||||
|
|
||||||
user = await sails.helpers.users
|
user = await sails.helpers.users
|
||||||
.update(user, values, this.req)
|
.updateOne(user, values, this.req)
|
||||||
.intercept('usernameAlreadyInUse', () => Errors.USERNAME_ALREADY_IN_USE);
|
.intercept('usernameAlreadyInUse', () => Errors.USERNAME_ALREADY_IN_USE);
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
|
|||||||
Reference in New Issue
Block a user