Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
maudem committed Jul 2, 2024
1 parent 012cbaa commit 9ad1259
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions edge-apps/transportation/static/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ const BusMonitor = (() => {

async function fetchBusData() {
try {
// const stopPoints = await getCachedData(mockStopData, 'stopData');
const stopPoints = await getCachedData(`${proxyUrl}/${apiUrl}?api_key=${apiKey}&agency=AC`, 'stopData');
// mock
const stopPoints = await getCachedData(mockStopData, 'stopData');
// const stopPoints = await getCachedData(`${proxyUrl}/${apiUrl}?api_key=${apiKey}&agency=AC`, 'stopData');
const stopData = stopPoints.ServiceDelivery.StopMonitoringDelivery.MonitoredStopVisit;
const sortedBuses = stopData.sort((a, b) =>
a.MonitoredVehicleJourney.MonitoredCall.ExpectedArrivalTime - b.MonitoredVehicleJourney.MonitoredCall.ExpectedArrivalTime);
Expand Down

0 comments on commit 9ad1259

Please sign in to comment.