From 52578b79798cbbe7f06e7c783ce6ecc506d9dcb4 Mon Sep 17 00:00:00 2001 From: andrzej Date: Sun, 30 Jun 2024 20:15:57 +0200 Subject: [PATCH] add get method --- src/app/lib/get.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/app/lib/get.ts b/src/app/lib/get.ts index 66e0fc2..3141d22 100644 --- a/src/app/lib/get.ts +++ b/src/app/lib/get.ts @@ -13,6 +13,14 @@ export async function getStoriesWithGenres() { ) } +export async function getStoriesWithGenresAndSubs() { + return prisma.story.findMany({ + include: { + genres: true, + subs: true + } + }) +} export async function getPubs() { return prisma.pub.findMany()