🎥 Make videos programmatically with React
fix cleanup buckets
Jonny Burger836f17d8c58d
diff --git a/packages/lambda/src/cleanup-buckets.ts b/packages/lambda/src/cleanup-buckets.tsindex 75d36ab27a..0896055afe 100644--- a/packages/lambda/src/cleanup-buckets.ts+++ b/packages/lambda/src/cleanup-buckets.ts@@ -32,17 +32,16 @@ export const cleanUpBuckets = xns(Bucket: bucket,}));- if (!list.Contents) {- continue;- }- for (const object of list.Contents) {- await s3client.send(- new DeleteObjectCommand({- Bucket: bucket,- Key: object.Key,- })- );- console.log('Deleted', `${bucket}/${object.Key}`);+ if (list.Contents) {+ for (const object of list.Contents) {+ await s3client.send(+ new DeleteObjectCommand({+ Bucket: bucket,+ Key: object.Key,+ })+ );+ console.log('Deleted', `${bucket}/${object.Key}`);+ }}await s3client.send(new DeleteBucketCommand({