Answers for "like dislike node js"

0

like dislike node js

router.post('/like/:id', function(req, res,next){
  blogModel.update({_id:req.params.id},{$push:{likes:req.user.id}}, function(err, data){
          if(err){res.json(err)}
          else{console.log('liked by'+ req.user.name)
     }
   });
    });
Posted by: Guest on October-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language