Added Aircraft log to mission

This commit is contained in:
PxlLoewe
2025-05-20 14:15:24 -07:00
parent 1696c79122
commit df4cff827e
13 changed files with 354 additions and 84 deletions

View File

@@ -6,11 +6,14 @@ export async function GET(req: NextRequest): Promise<NextResponse> {
const id = searchParams.get("id");
const filter = searchParams.get("filter");
console.log(filter);
const filterParsed = JSON.parse(filter || "{}");
try {
const data = await prisma.mission.findMany({
where: {
id: id ? Number(id) : undefined,
...(filter ? JSON.parse(filter) : {}),
...filterParsed,
},
});