Closed sebgro98 closed 8 hours ago
Update the seed.js file to include a function to create dummy data. Connected to: https://github.com/boolean-uk/team-dev-server-ex-2410-team3/issues/3
async function createComment(postId, userId, content) { const comment = await prisma.comment.create({ data: { postId, userId, content }, include: { user: true } }) console.info('Comment created', comment) return comment }
Also call this function to create a comment as dummy data.
await createComment(post.id, student.id, 'Great post!')
approved
Approved
Update the seed.js file to include a function to create dummy data. Connected to: https://github.com/boolean-uk/team-dev-server-ex-2410-team3/issues/3
Also call this function to create a comment as dummy data.