observatoire

This commit is contained in:
alma 2025-05-06 22:09:15 +02:00
parent 02bde3560f
commit 025040289b

View File

@ -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