mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 18:52:06 +00:00
Feat: Update user validation schema to include username/email check
The validation schema will throw an error if the username or email is already found in the database.
This commit is contained in:
@@ -53,7 +53,16 @@ const createNewUsers = async ({ numberOfUsers }: CreateNewUsersArgs) => {
|
||||
const dateOfBirth = faker.date.birthdate({ mode: 'age', min: 19 });
|
||||
const createdAt = faker.date.past(1);
|
||||
|
||||
const user = { firstName, lastName, email, username, dateOfBirth, createdAt, hash };
|
||||
const user = {
|
||||
firstName,
|
||||
lastName,
|
||||
email,
|
||||
username,
|
||||
dateOfBirth,
|
||||
createdAt,
|
||||
hash,
|
||||
accountIsVerified: true,
|
||||
};
|
||||
|
||||
data.push(user);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user