diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts index 49c6f76e..ab2a15bd 100644 --- a/src/store/modules/job/actions.ts +++ b/src/store/modules/job/actions.ts @@ -398,7 +398,7 @@ const actions: ActionTree = { return resp; }, - async scheduleService({ dispatch, commit, rootGetters }, job) { + async scheduleService({ dispatch, commit }, job) { let resp; const payload = { @@ -416,7 +416,7 @@ const actions: ActionTree = { 'runAsUser': 'system', //default system, but empty in run now. TODO Need to remove this as we are using SERVICE_RUN_AS_SYSTEM, currently kept it for backward compatibility 'recurrenceTimeZone': this.state.user.current.userTimeZone }, - 'shopifyConfigId': rootGetters['user/getShopifyConfigId'], + 'shopifyConfigId': this.state.user.shopifyConfigId, 'statusId': "SERVICE_PENDING", 'systemJobEnumId': job.systemJobEnumId } as any @@ -520,7 +520,7 @@ const actions: ActionTree = { return resp; }, - async runServiceNow({ dispatch, rootGetters }, job) { + async runServiceNow({ dispatch }, job) { let resp; const payload = { @@ -535,7 +535,7 @@ const actions: ActionTree = { 'parentJobId': job.parentJobId, 'recurrenceTimeZone': this.state.user.current.userTimeZone }, - 'shopifyConfigId': rootGetters['user/getShopifyConfigId'], + 'shopifyConfigId': this.state.user.shopifyConfigId, 'statusId': "SERVICE_PENDING", 'systemJobEnumId': job.systemJobEnumId } as any diff --git a/src/store/modules/webhook/actions.ts b/src/store/modules/webhook/actions.ts index bb59bd2c..ec00de71 100644 --- a/src/store/modules/webhook/actions.ts +++ b/src/store/modules/webhook/actions.ts @@ -7,8 +7,8 @@ import * as types from './mutations-types' import { translate } from '@/i18n' const actions: ActionTree = { - async fetchWebhooks({ commit, rootGetters }) { - await WebhookService.fetchShopifyWebhooks({ shopifyConfigId: rootGetters['user/getShopifyConfigId'] }).then(resp => { + async fetchWebhooks({ commit }) { + await WebhookService.fetchShopifyWebhooks({ shopifyConfigId: this.state.user.shopifyConfigId }).then(resp => { if (resp.status == 200 && resp.data.webhooks?.length > 0 && !hasError(resp)) { const webhooks = resp.data.webhooks; const topics: any = {} @@ -35,7 +35,7 @@ const actions: ActionTree = { dispatch('fetchWebhooks') } }, - async subscribeWebhook({ dispatch, rootGetters }, id: string) { + async subscribeWebhook({ dispatch }, id: string) { // stores the webhook service that needs to be called on the basis of current webhook selected, doing // so as we have defined separate service for different webhook subscription @@ -58,7 +58,7 @@ const actions: ActionTree = { let resp; try { - resp = await webhookMethod({ shopifyConfigId: rootGetters['user/getShopifyConfigId'] }) + resp = await webhookMethod({ shopifyConfigId: this.state.user.shopifyConfigId }) if (resp.status == 200 && !hasError(resp)) { showToast(translate('Webhook subscribed successfully'))