fix(loads/branches): enable endpoints

This commit is contained in:
Josepablo C
2024-03-11 19:40:39 -06:00
parent ff5101702c
commit 17ca6bcba5
4 changed files with 48 additions and 20 deletions

View File

@@ -121,6 +121,7 @@ const patchVehicle = async(req, res) => {
if( permissions !== "role_carrier" ){
throw "You can't modify vehicles";
}
data.company = companyId;
await Model.findByIdAndUpdate( elementId , data );
return res.send( await Model.findById( elementId ) );
}catch(error){