Note that enabling session support is entirely optional, though it is recommended for most applications. If enabled, be sure to use
express.session() before passport.session() to ensure that the login session is restored in the correct order.
express.session() before passport.session() to ensure that the login session is restored in the correct order.
ocase.save({ currentStep : theStep },callback);
OCase.findByIdAndUpdate(req.params.id,
req.body, callback);
update err:MongoError: exception: Mod on _id not allowed
OCase.findByIdAndUpdate(req.params.id,
{subject : req.body.subject,
description : req.body.description
},callback);
update err:TypeError: Cannot read property '_id' of undefined
OCase.findById(req.params.id,
function(err,ocase){
ocase.set(req.body);
ocase.save(function(err,ocase){
res.send(ocase);
});
});