feat: complete current GoChat updates
This commit is contained in:
@@ -29,8 +29,10 @@ export const actions = {
|
||||
const response = await CustomRoleAPI.get();
|
||||
commit(types.default.SET_CUSTOM_ROLE, response.data);
|
||||
commit(types.default.SET_CUSTOM_ROLE_UI_FLAG, { fetchingList: false });
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
commit(types.default.SET_CUSTOM_ROLE_UI_FLAG, { fetchingList: false });
|
||||
return throwErrorMessage(error);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -68,10 +70,10 @@ export const actions = {
|
||||
try {
|
||||
await CustomRoleAPI.delete(id);
|
||||
commit(types.default.DELETE_CUSTOM_ROLE, id);
|
||||
commit(types.default.SET_CUSTOM_ROLE_UI_FLAG, { deletingItem: true });
|
||||
commit(types.default.SET_CUSTOM_ROLE_UI_FLAG, { deletingItem: false });
|
||||
return id;
|
||||
} catch (error) {
|
||||
commit(types.default.SET_CUSTOM_ROLE_UI_FLAG, { deletingItem: true });
|
||||
commit(types.default.SET_CUSTOM_ROLE_UI_FLAG, { deletingItem: false });
|
||||
return throwErrorMessage(error);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user