#254 remove warning for stale project, needs to be tested more

This commit is contained in:
Cassie Tarakajian 2017-01-25 13:39:20 -05:00
parent ab19b8d598
commit a59efb2583

View file

@ -32,9 +32,9 @@ export function updateProject(req, res) {
if (!req.user || !project.user.equals(req.user._id)) { if (!req.user || !project.user.equals(req.user._id)) {
return res.status(403).send({ success: false, message: 'Session does not match owner of project.' }); return res.status(403).send({ success: false, message: 'Session does not match owner of project.' });
} }
if (req.body.updatedAt && moment(req.body.updatedAt) < moment(project.updatedAt)) { // if (req.body.updatedAt && moment(req.body.updatedAt) < moment(project.updatedAt)) {
return res.status(409).send({ success: false, message: 'Attempted to save stale version of project.' }); // return res.status(409).send({ success: false, message: 'Attempted to save stale version of project.' });
} // }
Project.findByIdAndUpdate(req.params.project_id, Project.findByIdAndUpdate(req.params.project_id,
{ {
$set: req.body $set: req.body