feat: Adds the ability to delete a segment (#3836)

* feat: Adds the ability to delete a segment

* Minor fixes

* Small changes
This commit is contained in:
Sivin Varghese
2022-01-24 17:37:43 +05:30
committed by GitHub
parent e90d064648
commit b304f5a826
8 changed files with 77 additions and 18 deletions
@@ -49,10 +49,10 @@ export const actions = {
commit(types.SET_CUSTOM_VIEW_UI_FLAG, { isCreating: false });
}
},
delete: async ({ commit }, id) => {
delete: async ({ commit }, { id, filterType }) => {
commit(types.SET_CUSTOM_VIEW_UI_FLAG, { isDeleting: true });
try {
await CustomViewsAPI.delete(id);
await CustomViewsAPI.deleteCustomViews(id, filterType);
commit(types.DELETE_CUSTOM_VIEW, id);
} catch (error) {
throw new Error(error);