correção da atualização do email sem comentarios
parent
a2471fd08d
commit
ee16d6e7c3
|
@ -45,11 +45,6 @@ const UpdateUserService = async ({
|
||||||
|
|
||||||
const emailExists = await User.findOne({ where: { email: value }, raw: true, attributes: ['email', 'id'] });
|
const emailExists = await User.findOne({ where: { email: value }, raw: true, attributes: ['email', 'id'] });
|
||||||
|
|
||||||
console.log('emailExists.email: ', emailExists?.email)
|
|
||||||
console.log('User.email: ', user.email)
|
|
||||||
console.log('emailExists.id: ', emailExists?.id)
|
|
||||||
console.log('User.id: ', user.id)
|
|
||||||
|
|
||||||
if (emailExists && user.id != emailExists?.id) {
|
if (emailExists && user.id != emailExists?.id) {
|
||||||
|
|
||||||
console.error('The email already exists in another user profile!')
|
console.error('The email already exists in another user profile!')
|
||||||
|
|
Loading…
Reference in New Issue