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
@@ -7,7 +7,6 @@ import FBChannel from '../../api/channel/fbChannel';
import TwilioChannel from '../../api/channel/twilioChannel';
import WhatsappChannel from '../../api/channel/whatsappChannel';
import { throwErrorMessage } from '../utils/api';
import { createCacheRevalidateAction } from '../utils/cacheRevalidate';
import AnalyticsHelper from '../../helper/AnalyticsHelper';
import camelcaseKeys from 'camelcase-keys';
import { ACCOUNT_EVENTS } from '../../helper/AnalyticsHelper/events';
@@ -190,11 +189,6 @@ const sendAnalyticsEvent = channelType => {
};
export const actions = {
revalidate: createCacheRevalidateAction({
api: InboxesAPI,
mutation: types.default.SET_INBOXES,
getData: response => response.data.payload,
}),
get: async ({ commit }) => {
commit(types.default.SET_INBOXES_UI_FLAG, { isFetching: true });
try {