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) => {
|
.exec((err, projects) => {
|
||||||
projects.forEach((project, projectIndex) => {
|
projects.forEach((project, projectIndex) => {
|
||||||
project.files.forEach((file) => {
|
project.files.forEach((file) => {
|
||||||
|
if (file.isSelected && !file.isSelectedFile) {
|
||||||
|
file.isSelectedFile = file.isSelected;
|
||||||
|
delete file.isSelected;
|
||||||
|
}
|
||||||
|
|
||||||
if (file.name === 'sketch.js') {
|
if (file.name === 'sketch.js') {
|
||||||
file.isSelectedFile = true;
|
file.isSelectedFile = true;
|
||||||
delete file.isSelected;
|
delete file.isSelected;
|
||||||
|
@ -105,12 +110,12 @@ Project.find({})
|
||||||
// if (file.isSelctedFile) {
|
// if (file.isSelctedFile) {
|
||||||
// console.log('changed to isSelected file');
|
// console.log('changed to isSelected file');
|
||||||
// }
|
// }
|
||||||
});
|
|
||||||
project.save((err, savedProject) => {
|
project.save((err, savedProject) => {
|
||||||
console.log('project', projectIndex, 'is saved.');
|
console.log('project', projectIndex, 'is saved.');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue