Files
v2.admin.gaertan.art/src/actions/artworks/getArtworks.ts

23 lines
478 B
TypeScript

"use server"
import { prisma } from "@/lib/prisma"
export async function getSingleArtwork(id: string) {
return await prisma.artwork.findUnique({
where: { id },
include: {
// album: true,
// type: true,
file: true,
gallery: true,
metadata: true,
albums: true,
categories: true,
colors: { include: { color: true } },
// sortContexts: true,
tags: true,
variants: true,
timelapse: true
}
})
}