problem description
I am doing the favorite theme function of cnodejs, using the vue framework. Send post to request 500 errors from the Times.
related codes
/ / Please paste the code text below (do not replace the code with pictures)
< Button type= "success" class= "collect": class= "{"cancel-col": info.is_collect}" @ click= "collect (info.id)" > {{isCollect} < / Button >
/ / collect or uncollect
collect(id){
let accesstoken = Cookies.get("accesstoken");
if(this.info.is_collect){
//
}else{
//
axios.post("https://cnodejs.org/api/v1/topic_collect/collect", {
accesstoken,
id
}).then((res) => {
console.log(res.data);
}, (error) => {
console.log(error);
});
}
}
what result do you expect? What is the error message actually seen?
POST https://cnodejs.org/api/v1/to. 500 (Internal Server Error)