diff --git a/cdk/lib/challenge4/api/router/routes/functions/listFile.ts b/cdk/lib/challenge4/api/router/routes/functions/listFile.ts index 0d86a6c..3a96b74 100644 --- a/cdk/lib/challenge4/api/router/routes/functions/listFile.ts +++ b/cdk/lib/challenge4/api/router/routes/functions/listFile.ts @@ -44,7 +44,7 @@ const getListObjects = async ( return content.Key?.split('/').length === 1 || (content.Key?.split('/').length === 2 && content.Key?.split('/')[1] !== ''); }) .map((content) => { - return content.Key; + return content.Key?.split('/')[1]; }); return {