From 0ca236d8fe367d124e1fafcb109642f9e3510fb3 Mon Sep 17 00:00:00 2001 From: Stivenjs Date: Sun, 8 Jun 2025 20:23:48 -0500 Subject: [PATCH] fix(route): await params in GET function to ensure proper path extraction from request parameters --- app/assets/[...path]/route.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/assets/[...path]/route.ts b/app/assets/[...path]/route.ts index 08b0f573..fe65653d 100644 --- a/app/assets/[...path]/route.ts +++ b/app/assets/[...path]/route.ts @@ -6,9 +6,12 @@ const s3Client = new S3Client({ region: process.env.REGION_BUCKET || 'us-east-2', }) -export async function GET(request: NextRequest, { params }: { params: { path: string[] } }) { +export async function GET( + request: NextRequest, + { params }: { params: Promise<{ path: string[] }> } +) { try { - const { path } = params + const { path } = await params const assetPath = path.join('/') // Extraer storeId del host/subdominio