@@ -28,15 +28,11 @@ export async function GET(
|
||||
return NextResponse.json({ error: "Project not found" }, { status: 404 });
|
||||
}
|
||||
|
||||
// Find shots that have at least one task with a client-visible version
|
||||
// Only return shots that have been explicitly shared with the client
|
||||
const shots = await db.shot.findMany({
|
||||
where: {
|
||||
projectId: session.projectId,
|
||||
tasks: {
|
||||
some: {
|
||||
versions: { some: { isClientVisible: true } },
|
||||
},
|
||||
},
|
||||
sharedWithClient: true,
|
||||
},
|
||||
orderBy: [{ sequence: "asc" }, { shotCode: "asc" }],
|
||||
select: {
|
||||
@@ -45,6 +41,7 @@ export async function GET(
|
||||
sequence: true,
|
||||
description: true,
|
||||
status: true,
|
||||
shotApprovalStatus: true,
|
||||
thumbnailUrl: true,
|
||||
tasks: {
|
||||
where: {
|
||||
|
||||
Reference in New Issue
Block a user