Skip to content

Commit

Permalink
Improved: code to pass the token in the client method when fetching e…
Browse files Browse the repository at this point in the history
…com stores
  • Loading branch information
ymaheshwari1 committed Oct 25, 2024
1 parent 1b68ab6 commit b28ba1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ const actions: ActionTree<UserState, RootState> = {
* 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);
Expand Down

0 comments on commit b28ba1e

Please sign in to comment.