more db reformatting
This commit is contained in:
parent
90c55e9e0b
commit
f1ec50d914
1 changed files with 4 additions and 2 deletions
|
@ -87,13 +87,15 @@ Project.find({})
|
|||
.exec((err, projects) => {
|
||||
projects.forEach((project, projectIndex) => {
|
||||
project.files.forEach((file) => {
|
||||
if (file.isSelected) {
|
||||
file.isSelectedFile = file.isSelected;
|
||||
if (file.name === 'sketch.js') {
|
||||
file.isSelectedFile = true;
|
||||
delete file.isSelected;
|
||||
console.log(file);
|
||||
// file.save((err, savedFile) => {
|
||||
// console.log('file saved');
|
||||
// });
|
||||
} else {
|
||||
file.isSelctedFile = false;
|
||||
}
|
||||
// console.log('project', projectIndex);
|
||||
// if (file.isSelected) {
|
||||
|
|
Loading…
Reference in a new issue