From b28ba1ee8884186a2414ac085c321fd830706fd0 Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 25 Oct 2024 11:34:42 +0530 Subject: [PATCH] Improved: code to pass the token in the client method when fetching ecom stores --- src/store/modules/user/actions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 1faa9f19..3d62a293 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -174,7 +174,8 @@ const actions: ActionTree = { * update current facility information */ async setFacility ({ commit, dispatch }, payload) { - const eComStore = await UserService.getEComStores(undefined, payload.facility.facilityId); + const token = store.getters['user/getUserToken']; + const eComStore = await UserService.getEComStores(token, payload.facility.facilityId); commit(types.USER_CURRENT_ECOM_STORE_UPDATED, eComStore); commit(types.USER_CURRENT_FACILITY_UPDATED, payload.facility);