Refactor color generaton on artwork single page

This commit is contained in:
2025-12-25 22:51:17 +01:00
parent 25ba47f7be
commit e9176ff73e
6 changed files with 211 additions and 76 deletions

View File

@ -0,0 +1,11 @@
"use server";
import { prisma } from "@/lib/prisma";
export async function getArtworkColors(artworkId: string) {
return prisma.artworkColor.findMany({
where: { artworkId },
include: { color: true },
orderBy: [{ type: "asc" }],
});
}