mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Did more work to beer post page, seed
Worked on comments and beer recs features. Fine tuning database seed amounts.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { faker } from '@faker-js/faker';
|
||||
import { BeerPost, BeerImage } from '@prisma/client';
|
||||
import DBClient from '../../DBClient';
|
||||
|
||||
@@ -10,7 +12,7 @@ const createNewBeerImages = async ({
|
||||
beerPosts,
|
||||
}: CreateNewBeerImagesArgs) => {
|
||||
const prisma = DBClient.instance;
|
||||
|
||||
const createdAt = faker.date.past(1);
|
||||
const beerImagesPromises: Promise<BeerImage>[] = [];
|
||||
|
||||
// eslint-disable-next-line no-plusplus
|
||||
@@ -22,6 +24,7 @@ const createNewBeerImages = async ({
|
||||
url: 'https://picsum.photos/900/1600',
|
||||
alt: 'Placeholder beer image.',
|
||||
beerPost: { connect: { id: beerPost.id } },
|
||||
createdAt,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user