lieke

Solutions on MaxInterview for lieke by the best coders in the world

showing results for - "lieke"
Alan
24 Sep 2020
1router.post('/:id',(req,res,next)=>{
2counter = req.body.like;
3TestData.update({_id:id},{$inc:{likes:counter}}).exec()
4.then(result=>{
5res.status(200).json({message:'liked'});
6}).
7catch(err=>{
8res.status(500).json({error:err});
9});
10});
11
similar questions
queries leading to this page
lieke