Skip to content

Commit

Permalink
Removed: logic to create a user preference when pref not found(hotwax…
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Sep 1, 2023
1 parent 669c104 commit e7cf61c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,12 @@ const actions: ActionTree<UserState, RootState> = {
'userPrefTypeId': 'SELECTED_ORDER_PARKING'
});

// if we already have a preference for order parking then updating it, otherwise, creating a new preference for order parking
// if we already have a preference for order parking then updating it
if(userPrefResponse.data.userPrefValue) {
currentOrderParking = Object.keys(facilities).filter((facilityId: any) => userPrefResponse.data.userPrefValue.includes(facilityId))
commit(types.USER_CURRENT_PARKING_UPDATED, currentOrderParking);
} else {
dispatch('setOrderParking', currentOrderParking)
}

commit(types.USER_CURRENT_PARKING_UPDATED, currentOrderParking);
commit(types.USER_VIRTUAL_FACILITIES_UPDATED, facilities)
} else {
throw resp.data
Expand Down

0 comments on commit e7cf61c

Please sign in to comment.