Lieke == 1
app.post("/index/:id", function (req, res) {
TestData.findById(req.params.id, function (err, theUser) {
if (err) {
console.log(err);
} else {
theUser.likes += 1;
theUser.save();
console.log(theUser.likes);
res.send({likeCount: theUser.likes}); //something like this...
}
});
});
Average Alligator