multiple plates
Deploy / deploy (push) Successful in 2m32s

This commit is contained in:
twotalesanimation
2026-05-21 19:16:03 +02:00
parent 32073fbe4c
commit 3e3a8f7a26
7 changed files with 377 additions and 250 deletions
+5
View File
@@ -17,6 +17,7 @@ export async function GET(
where: { id: shotId },
include: {
artist: { select: { id: true, name: true, email: true, image: true } },
footagePlates: { orderBy: { sortOrder: "asc" } },
versions: {
orderBy: { versionNumber: "desc" },
include: {
@@ -68,6 +69,10 @@ export async function GET(
// Serialize BigInt fields (fileSize) so JSON.stringify doesn't throw
const shotSerialized = {
...shot,
footagePlates: shot.footagePlates.map((p) => ({
...p,
fileSize: p.fileSize != null ? p.fileSize.toString() : null,
})),
versions: shot.versions.map((v) => ({
...v,
fileSize: v.fileSize != null ? v.fileSize.toString() : null,