mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 04:09:26 +00:00
fix: sonarcloud warning and code cleanup
This commit is contained in:
@@ -35,8 +35,9 @@ const CreateUserService = async ({
|
||||
"Check-email",
|
||||
"An user with this email already exists.",
|
||||
async value => {
|
||||
if (!value) return false;
|
||||
const emailExists = await User.findOne({
|
||||
where: { email: value! }
|
||||
where: { email: value }
|
||||
});
|
||||
return !emailExists;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user