[Vuejs]-How can i update an object id in vuejs

1๐Ÿ‘

โœ…

I guess there is an error in your axios call. You are sending token as the payload / body of the request instead of the id. And you send the id as a part of the options object. See axios docs.

Change it to:

axios
   .put(`http://localhost:5000/api/addresses/set/default`, { id },{ headers: {
            Authorization: "Bearer" + token,
            "x-access-token": token
          }
        })
   .then (โ€ฆ)

Leave a comment