Fix updates of username and email

pull/173/head
SimonTagne 4 years ago committed by GitHub
parent 729e5dac5e
commit 31d314736a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -69,7 +69,7 @@ module.exports = {
const values = _.pick(inputs, ['email']);
user = await sails.helpers.users
.update(user, values, this.req)
.updateOne(user, values, this.req)
.intercept('emailAlreadyInUse', () => Errors.EMAIL_ALREADY_IN_USE);
if (!user) {

@ -71,7 +71,7 @@ module.exports = {
const values = _.pick(inputs, ['username']);
user = await sails.helpers.users
.update(user, values, this.req)
.updateOne(user, values, this.req)
.intercept('usernameAlreadyInUse', () => Errors.USERNAME_ALREADY_IN_USE);
if (!user) {

Loading…
Cancel
Save