Skip to content

Commit

Permalink
Initial load now fires wakeup requests to both BoxPlaces and BoxRecords
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimon committed Mar 11, 2024
1 parent 32b1bfa commit 6b69527
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/KimaStore/KimaAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,16 @@ export const getPlaces = api => (bounds = null, filters = [], signal) => {
}
}

export const getInitialRecords = () => () => fetch('/start-records.json').then(onResponse);
export const getInitialRecords = api => () => {
// Send wakeup ping
fetch(`${api}/BoxRecords/35.21/31.76/35.25/31.79`, {
headers: {
'X-Kima-Session-Key': SESSION_ID
}
});

return fetch('start-records.json').then(onResponse);
}

export const getRecords = api => (bounds = null, filters = [], signal) => {
if (bounds) {
Expand Down

0 comments on commit 6b69527

Please sign in to comment.