How to solve this problem? Axios Delete - Type 'UserModelDelete' has no properties in common with type 'AxiosRequestConfig'
I don't understand how to solve this problem. Axios problem
I try to Delete vacation from mySql DB but have problem with Axios, I don't understand how solve this problem.
CodePudding user response:
Have a read of Axios' documentation. The second parameter of the delete
function expects a config object.
CodePudding user response:
It seems that you're passing a wrong parameter to axios.delete().
An example call would be:
axios.delete(url, { data: { user: "name" }, headers: { "Authorization": "token" } });
So you can try:
axios.delete(url, { data: userDataDelete });
You can check the Axios docs for more info