I'm facing an issue where I need to send data at once, but whenever I try sending it in a loop, I end up getting 500 duplicate id status errors. I have a hunch that if I click on something in JavaScript, the data might be sent all at once.
assignment: function (event) {
for (var i = 0; i < this.perPage; i++){
this.$http.post('mass_assigment', {
id_target: 5,
id_cms_users: 4,
updated_by: 5,
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
}
alert('success')
if (event){
alert(event.target.tagName)
}
}