only save files that need to be saved
This commit is contained in:
parent
754518bf77
commit
b2ee44a6c2
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue