Added Aircraft log to mission
This commit is contained in:
@@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user