Add date established to brewery page

This commit is contained in:
Aaron William Po
2023-04-23 20:31:09 -04:00
parent 58d30b605f
commit eec082e73a
11 changed files with 119 additions and 83 deletions

View File

@@ -24,6 +24,8 @@ const createNewBreweryPosts = async ({
const description = faker.lorem.lines(5);
const user = users[Math.floor(Math.random() * users.length)];
const createdAt = faker.date.past(1);
const dateEstablished = faker.date.past(40);
breweryPromises.push(
prisma.breweryPost.create({
data: {
@@ -32,6 +34,7 @@ const createNewBreweryPosts = async ({
description,
postedBy: { connect: { id: user.id } },
createdAt,
dateEstablished,
},
}),
);