0👍
Your request currently sends the user ID in the URL, but the backend is expecting it as a data field named id_user
.
Update your request to send the ID as data:
axios.post(API + `users/hapus`, {
data: {
id_user: id
}
})
Source:stackexchange.com