• Leif Christian posted an update 3 years, 2 months ago

    router.post(‘/update’, function(req, res) {
    StudentModel.findByIdAndUpdate(req.body.id,
    {Name:req.body.Name}, function(err, data) {
    if(err){
    console.log(err);
    }
    else{
    res.send(data);
    console.log(“Data updated!”);
    }
    });
    });

    mongoDB update route

Copyright 2017 PocketDesk Inc.
or

Log in with your credentials

Forgot your details?