db reformat testing

This commit is contained in:
catarak 2016-09-14 16:20:25 -04:00
parent 9e6d4b56bd
commit 912cddf776

View file

@ -87,14 +87,22 @@ 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 === true || file.isSelected === false) { // if (file.isSelected === true || file.isSelected === false) {
file.isSelectedFile = file.isSelected; // file.isSelectedFile = file.isSelected;
delete file.isSelected; // delete file.isSelected;
// }
console.log('project', projectIndex);
if (file.isSelected) {
console.log('is selected remains');
}
if (file.isSelctedFile) {
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.');
}); // });
}); });
}); });