2 years ago
#65768
Tsourou Nas
Update wordpress Post title via axios and vue js
Hi to all i want to change wordpress custom post title via my vue js app on button click but nothing change! The code i use is written bellow
handleController(){
axios.post('https://nice-ardinghelli.185-4-133-211.plesk.page/admin/wp-json/wp/v2/teams/'+this.team.id, {
title: 'changetitle'
})
.then( response => {})
.catch(e => {this.errors.push(e)})
}
},
The message in Postman when call the api url with POST method is written below
{
"code": "rest_cannot_edit",
"message": "Sorry, you are not allowed to edit this post.",
"data": {
"status": 401
}
}
vue.js
axios
nuxt.js
wordpress-rest-api
0 Answers
Your Answer