Skip to content

Commit add2509

Browse files
committed
final prep 5
1 parent 933255a commit add2509

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

models/project.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ module.exports.addUserToProject = function(id, user, callback){
120120
}
121121
}).then((raw) => {
122122
callback(null,raw.nModified);
123-
Project.sendPushForProject(id, 1);
123+
//Project.sendPushForProject(id, 1);
124124
}).catch(error=>{
125125
callback(error, null);
126126
});
@@ -142,7 +142,7 @@ module.exports.removeUserFromProject = function(id, user, callback){
142142
}
143143
}).then((raw) => {
144144
callback(null,raw.nModified);
145-
Project.sendPushForProject(id, 1);
145+
//Project.sendPushForProject(id, 1);
146146
}).catch(error=>{
147147
callback(error, null);
148148
});
@@ -196,7 +196,7 @@ module.exports.saveFloorPlanName = function (id, projectId, name, callback) {
196196
.then((raw) =>
197197
{
198198
callback(null,raw.nModified);
199-
Project.sendPushForProject(id, 1);
199+
//Project.sendPushForProject(id, 1);
200200
})
201201
.catch(error=>{
202202
callback(error, null);

routes/projects.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,25 @@ router.get('/:id', passport.authenticate('jwt', {session:false}), (req, res, nex
104104
}
105105
else
106106
{
107+
try{
108+
107109
let images = [];
108110

109111
for(let i = 0; i < project.floorPlans.length; i++)
110112
{
111113
let floorPlan = project.floorPlans[i];
112114
images.push(new Image(floorPlan));
113115
}
116+
}
117+
catch (e) {
118+
console.log(e);
119+
}
120+
121+
114122
project = JSON.parse(JSON.stringify(project));
115123
project.floorPlans = images;
116124

125+
117126
res.send({success: true, project: project});
118127
}
119128

0 commit comments

Comments
 (0)