fix
This commit is contained in:
@@ -632,6 +632,27 @@ export default createStore({
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
async profileUpdate({ commit }, payload) {
|
||||
commit('setLoading', true)
|
||||
await axios.post(PROFILE_UPDATE_API, {
|
||||
name: payload.first_name,
|
||||
last_name:payload.last_name,
|
||||
phone: payload.phone,
|
||||
image:payload.image
|
||||
}, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
|
||||
}
|
||||
}) .then(response => {
|
||||
commit('setLoading', false)
|
||||
console.log('Response:', response.data);
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
commit('setLoading', false)
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
getIsLoading(state){
|
||||
|
Reference in New Issue
Block a user