even more db reformat
This commit is contained in:
parent
f1ec50d914
commit
fcf09c6779
1 changed files with 8 additions and 3 deletions
|
@ -87,6 +87,11 @@ Project.find({})
|
|||
.exec((err, projects) => {
|
||||
projects.forEach((project, projectIndex) => {
|
||||
project.files.forEach((file) => {
|
||||
if (file.isSelected && !file.isSelectedFile) {
|
||||
file.isSelectedFile = file.isSelected;
|
||||
delete file.isSelected;
|
||||
}
|
||||
|
||||
if (file.name === 'sketch.js') {
|
||||
file.isSelectedFile = true;
|
||||
delete file.isSelected;
|
||||
|
@ -105,9 +110,9 @@ Project.find({})
|
|||
// if (file.isSelctedFile) {
|
||||
// console.log('changed to isSelected file');
|
||||
// }
|
||||
});
|
||||
project.save((err, savedProject) => {
|
||||
console.log('project', projectIndex, 'is saved.');
|
||||
project.save((err, savedProject) => {
|
||||
console.log('project', projectIndex, 'is saved.');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue