Skip to content

Commit

Permalink
Improved: added getCurrentFacilityId in login action to get current f…
Browse files Browse the repository at this point in the history
…acility(#dxp/288)
  • Loading branch information
R-Sourabh committed Nov 18, 2024
1 parent 940a0f2 commit f597993
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ const actions: ActionTree<UserState, RootState> = {
return uniqueFacilities
}, []);
// TODO Use a separate API for getting facilities, this should handle user like admin accessing the app
const currentFacility: any = useUserStore().getCurrentFacility
const currentEComStore = await UserService.getCurrentEComStore(token, currentFacility?.facilityId);
const currentEComStore = await UserService.getCurrentEComStore(token, getCurrentFacilityId());

/* ---- Guard clauses ends here --- */

Expand Down

0 comments on commit f597993

Please sign in to comment.