Last active
September 9, 2020 06:07
-
-
Save cyberfly/c639cfe6283db5dadf9fbbb3e4cc242f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { id, ...payload_without_id } = payload; | |
// use case | |
updateMilestone({ commit, state, getters }, payload) { | |
const { id, ...payload_without_id } = payload; | |
const url = `${base_url}api/milestones/${id}/`; | |
return axios | |
.patch(url, payload_without_id) | |
.then(response => { | |
let milestone = response.data; | |
commit('updateMilestone', milestone); | |
return milestone; | |
}) | |
.catch(function (error) { | |
console.log("error res -->", error); | |
throw error; | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment