mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 19:59:20 +00:00
chore: adding user creation tests
This commit is contained in:
@@ -32,13 +32,10 @@ const CreateUserService = async ({
|
||||
"Check-email",
|
||||
"An user with this email already exists.",
|
||||
async value => {
|
||||
if (value) {
|
||||
const emailExists = await User.findOne({
|
||||
where: { email: value }
|
||||
});
|
||||
return !emailExists;
|
||||
}
|
||||
return false;
|
||||
const emailExists = await User.findOne({
|
||||
where: { email: value! }
|
||||
});
|
||||
return !emailExists;
|
||||
}
|
||||
),
|
||||
password: Yup.string().required().min(5)
|
||||
|
||||
Reference in New Issue
Block a user