@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user