diff --git a/app/api/missions/image/[...path]/route.ts b/app/api/missions/image/[...path]/route.ts index 21dc71a5..aea345dd 100644 --- a/app/api/missions/image/[...path]/route.ts +++ b/app/api/missions/image/[...path]/route.ts @@ -16,15 +16,18 @@ const s3Client = new S3Client({ }); // This endpoint serves mission images from Minio using the server's credentials -export async function GET(request: NextRequest, { params }: { params: { path: string[] } }) { +export async function GET( + request: NextRequest, + context: { params: { path: string[] } } +) { try { // Check if path is provided - if (!params.path || params.path.length === 0) { + if (!context.params.path || context.params.path.length === 0) { return new NextResponse('Path is required', { status: 400 }); } // Reconstruct the full path from path segments - const filePath = params.path.join('/'); + const filePath = context.params.path.join('/'); console.log('Fetching mission image:', filePath); // Create S3 command to get the object