refactor: fold cache revalidation into the event dispatcher

This commit is contained in:
Shivam Mishra
2026-06-10 12:59:26 +05:30
parent 343b25842a
commit 3e65534e68
11 changed files with 136 additions and 184 deletions
@@ -6,7 +6,6 @@ import {
DELETE_TEAM,
} from './types';
import TeamsAPI from '../../../api/teams';
import { createCacheRevalidateAction } from '../../utils/cacheRevalidate';
export const actions = {
create: async ({ commit }, teamInfo) => {
@@ -22,10 +21,6 @@ export const actions = {
commit(SET_TEAM_UI_FLAG, { isCreating: false });
}
},
revalidate: createCacheRevalidateAction({
api: TeamsAPI,
mutation: SET_TEAMS,
}),
get: async ({ commit }) => {
commit(SET_TEAM_UI_FLAG, { isFetching: true });
try {