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) => {
|
.exec((err, projects) => {
|
||||||
projects.forEach((project, projectIndex) => {
|
projects.forEach((project, projectIndex) => {
|
||||||
project.files.forEach((file) => {
|
project.files.forEach((file) => {
|
||||||
if (file.isSelected) {
|
if (file.name === 'sketch.js') {
|
||||||
file.isSelectedFile = file.isSelected;
|
file.isSelectedFile = true;
|
||||||
delete file.isSelected;
|
delete file.isSelected;
|
||||||
console.log(file);
|
console.log(file);
|
||||||
// file.save((err, savedFile) => {
|
// file.save((err, savedFile) => {
|
||||||
// console.log('file saved');
|
// console.log('file saved');
|
||||||
// });
|
// });
|
||||||
|
} else {
|
||||||
|
file.isSelctedFile = false;
|
||||||
}
|
}
|
||||||
// console.log('project', projectIndex);
|
// console.log('project', projectIndex);
|
||||||
// if (file.isSelected) {
|
// if (file.isSelected) {
|
||||||
|
|
Loading…
Reference in a new issue