What could be causing the error message saying "callback is not a function" to appear in this particular action within my Vuex store?
updateRemoteUser: ({ state, commit }, callback) => {
const user = state.user
axios.put(`/users/${user.id}`, {
user: user
})
.then(response => {
commit('changeUser', response.data.user)
callback(true)
})
.catch(errors => {
console.log(errors)
callback(false)
})
},
UPDATE Furthermore, this action is being invoked as shown below:
async setResponses() {
this.userResponse = await this.updateRemoteUser()
if(this.userResponse) {
this.$router.push({ name: 'weddingDetails' })
}
else {
console.log("Something is jacked")
}
},