PATCH not working Fix
This commit is contained in:
parent
1bf4842d25
commit
4da7983945
|
@ -61,3 +61,17 @@ module.exports.deleteUrlData = async (req, res) => {
|
|||
res.sendStaus(500)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.updateUrlData = async (req,res) =>{
|
||||
//find a data object with url's id and update the alias
|
||||
Minfy.findByIdAndUpdate(req.params.id, {'alias': req.body.alias})
|
||||
.then((data)=>{
|
||||
//send back the updated data object
|
||||
res.send(data);
|
||||
})
|
||||
.catch((err)=>{
|
||||
//found error
|
||||
console.error(err)
|
||||
res.sendStatus(500)
|
||||
})
|
||||
}
|
||||
|
|
2425
backend/yarn.lock
2425
backend/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue