From a8f68ff7377bf2fa021ab2a29869d3933a86446c Mon Sep 17 00:00:00 2001 From: andrzej Date: Wed, 19 Jun 2024 11:33:27 +0200 Subject: [PATCH] include genres in getStory api call --- src/app/lib/get.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/lib/get.ts b/src/app/lib/get.ts index 797b286..1d9fb8c 100644 --- a/src/app/lib/get.ts +++ b/src/app/lib/get.ts @@ -1,7 +1,14 @@ "use server" import prisma from "./db" export async function getStories() { - return prisma.story.findMany() + return prisma.story.findMany( + { + include: { + genres: true + } + } + + ) } export async function getPubs() { return prisma.pub.findMany()