refactor: fold cache revalidation into the event dispatcher
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user