I am currently faced with a situation where I have a table that receives the userList as props and renders it using v-for="(user, index) in userList" :key="index" to display the username. However, my Swagger API now requires me to update the data structure to something like username:{value: "", operand: 1} when making a patch request. Can anyone provide guidance on how to change the data type and send it as formData to my axios patch request? My axios.patch method looked different before this requirement was discovered :')
async userEdit(id) {
const response = await this.$store.dispatch('axiosPatch', {url: `/employees/${id}`,
formData: {
username: {value: this.username.value, operand: 1},
email: this.email,
mobile: this.mobile,
}
}, this.$data)
},
The input form used is structured as follows:
<input type="text" class="text-xs text-secondary mb-0 text-center
border-0 bg-white w-100 p-1"
:disabled="!user.disabled"
:value="user.nationalCode">