console.log(JSON.stringify(brand)); here it is printing whole data
return fetch(`${API}/brand/${brandId}/${userId}`,{
method:"PUT",
headers:{
Accept:"application/json",
"Content-Type":"application/json",
Authorization:`Bearer ${token}`,
},
body:JSON.stringify(brand),
}).then(response=>{
console.log(response);
return response.json()
}).catch(err=> console.log(err))
}
exports.updateBrand=(req,res)=>{
console.log(req.body)//here it is printing {}
const brand = req.brand;
brand.name=req.body.name;
brand.save((err,updatedbrand)=>{
if(err){
console.log(err)
return res.status(400).json({
error:"Failed to update"
})
}
res.json(updatedbrand)
})
}```
当我打开Jupyter Notebook的Vscode时,会出现类似的错误
>> /home/inlizard/miniconda3/bin/activate && conda activate env
/home/inlizard/miniconda3/etc/conda/deactivate.d/mpivars.deactivate.sh: line 40: syntax error near unexpected token `(
/home/inlizard/miniconda3/etc/conda/deactivate.d/mpivars.deactivate.sh: line 40: ` if grep -q "compilers_and_libraries.*mpi" <(echo $FIP); then'