more db reformatting

This commit is contained in:
catarak 2016-09-14 16:27:05 -04:00
parent 90c55e9e0b
commit f1ec50d914

View file

@ -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) {