include genres in getStory api call

This commit is contained in:
andrzej 2024-06-19 11:33:27 +02:00
parent e7f0cf3fb6
commit 13a9407caa
1 changed files with 8 additions and 1 deletions

View File

@ -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()