fix
This commit is contained in:
parent
0d229f62f1
commit
ee28cfbaa8
@ -36,3 +36,4 @@ export const ADMIN_LOGIN_DETAIL = MAIN_DOMAIN + "/api/admin/admin-details"
|
||||
export const ADMIN_GET_SITE_SETTING = MAIN_DOMAIN + "/api/admin/site-settings"
|
||||
export const ADMIN_UPDATE_SITE_SETTING = MAIN_DOMAIN + "/api/admin/update-settings/"
|
||||
export const ADMIN_UPDATE_PASSWORD = MAIN_DOMAIN + "/api/admin/password-update"
|
||||
export const PROFILE_UPDATE_API = MAIN_DOMAIN + "/api/admin/admin-update-profile"
|
||||
|
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user