Update seed

Create new users updated to create a longer random value to prevent duplication when seeding db. Beer images now use a generated caption and alt text.
This commit is contained in:
Aaron William Po
2023-04-11 20:22:21 -04:00
parent 4594e22a4f
commit 6c8a510d80
3 changed files with 46 additions and 22 deletions

View File

@@ -18,7 +18,7 @@ const createNewUsers = async ({ numberOfUsers }: CreateNewUsersArgs) => {
// eslint-disable-next-line no-plusplus
for (let i = 0; i < numberOfUsers; i++) {
const randomValue = crypto.randomBytes(8).toString('hex');
const randomValue = crypto.randomBytes(10).toString('hex');
const firstName = faker.name.firstName();
const lastName = faker.name.lastName();
const username = `${firstName[0]}.${lastName}.${randomValue}`;