Skip to content

Commit

Permalink
Improved: api calls to include pageSize param in get requests
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Jun 14, 2024
1 parent 6977c59 commit cdab73a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/store/modules/orderRouting/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const actions: ActionTree<OrderRoutingState, RootState> = {
let routingGroups = [] as any;
// filter groups on the basis of productStoreId
const payload = {
productStoreId: store.state.user.currentEComStore.productStoreId
productStoreId: store.state.user.currentEComStore.productStoreId,
pageSize: 200
}

try {
Expand Down Expand Up @@ -216,7 +217,7 @@ const actions: ActionTree<OrderRoutingState, RootState> = {
let routingHistory = {}

try {
const resp = await OrderRoutingService.fetchRoutingHistory(routingGroupId, { orderByField: "startDate DESC" })
const resp = await OrderRoutingService.fetchRoutingHistory(routingGroupId, { orderByField: "startDate DESC", pageSize: 500 })

if(!hasError(resp)) {
// Sorting the history based on startTime, as we does not get the records in sorted order from api
Expand Down
9 changes: 6 additions & 3 deletions src/store/modules/util/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ const actions: ActionTree<UtilState, RootState> = {
}

const payload = {
parentTypeId: "VIRTUAL_FACILITY"
parentTypeId: "VIRTUAL_FACILITY",
pageSize: 200
}

try {
Expand Down Expand Up @@ -77,7 +78,8 @@ const actions: ActionTree<UtilState, RootState> = {

// Fetching shipping methods for productStore of the currentGroup
const payload = {
productStoreId: store.state.orderRouting.currentGroup.productStoreId
productStoreId: store.state.orderRouting.currentGroup.productStoreId,
pageSize: 200
}

try {
Expand Down Expand Up @@ -105,7 +107,8 @@ const actions: ActionTree<UtilState, RootState> = {
}

const payload = {
productStoreId: store.state.orderRouting.currentGroup.productStoreId
productStoreId: store.state.orderRouting.currentGroup.productStoreId,
pageSize: 200
}

try {
Expand Down

0 comments on commit cdab73a

Please sign in to comment.