diff --git a/server/migrations/moveBucket.js b/server/migrations/moveBucket.js index 69dc2c56..67a0a92d 100644 --- a/server/migrations/moveBucket.js +++ b/server/migrations/moveBucket.js @@ -35,10 +35,10 @@ Project.count({}) project.files.forEach(async (file, fileIndex) => { if (file.url && file.url.includes('p5.js-webeditor')) { file.url = file.url.replace('p5.js-webeditor', process.env.S3_BUCKET); + let savedProject = await project.save(); + console.log(`updated file ${file.url}`); + process.exit(0); } - let savedProject = await project.save(); - console.log(`updated file ${file.url}`); - process.exit(0); }); }); }