client review by episode filter added
Deploy / deploy (push) Failing after 47s

This commit is contained in:
twotalesanimation
2026-06-24 11:20:33 +02:00
parent 1a5a56cf4c
commit bb7368ab06
7 changed files with 388 additions and 16 deletions
+8 -1
View File
@@ -26,11 +26,18 @@ export async function GET(
return NextResponse.json({ error: "Project not found" }, { status: 404 });
}
// Only return shots that have been explicitly shared with the client
// Only return shots that have been explicitly shared with the client.
// If the session has episode restrictions, further filter to those episodes.
const episodeFilter =
session.allowedEpisodes && session.allowedEpisodes.length > 0
? session.allowedEpisodes
: undefined;
const shots = await db.shot.findMany({
where: {
projectId: session.projectId,
sharedWithClient: true,
...(episodeFilter ? { episode: { in: episodeFilter } } : {}),
},
orderBy: [{ episode: "asc" }, { sequence: "asc" }, { shotCode: "asc" }],
select: {