fleetmap-reports 2.0.20 → 2.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "2.0.20",
3
+ "version": "2.0.21",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -89,7 +89,7 @@ async function createSpeedingReportByDevice (from, to, userData, traccarInstance
89
89
  let deviceCount = 0
90
90
  for (const sliced of _sliced) {
91
91
  await Promise.all(sliced.map(async slice => {
92
- allData.devices = allData.devices.concat(await getEvents(traccarInstance, from, to, slice, userData, deviceCount, devices.length, slice.length, slice))
92
+ allData.devices = allData.devices.concat(await getEvents(traccarInstance, from, to, slice, userData, deviceCount, devices.length, slice.length))
93
93
  deviceCount = deviceCount + slice.length
94
94
  if (processServerSide()) {
95
95
  console.log('LOADING_MESSAGE:' + slice[0].name)
@@ -121,7 +121,7 @@ async function createSpeedingReportByDriver (from, to, userData, traccarInstance
121
121
  return { drivers: _drivers }
122
122
  }
123
123
 
124
- async function getEvents (traccarInstance, from, to, devices, userData, deviceCount, totalDevices, sliceSize, slice) {
124
+ async function getEvents (traccarInstance, from, to, devices, userData, deviceCount, totalDevices, sliceSize) {
125
125
  if (processServerSide()) {
126
126
  const url = `https://${process.env.SERVER_HOST}/reports/speeding-report/getEvents`
127
127
  return axios.post(url, { from, to, devices, userData, deviceCount, totalDevices, sliceSize }, { withCredentials: true }).then(d => d.data)
@@ -150,7 +150,7 @@ async function getEvents (traccarInstance, from, to, devices, userData, deviceCo
150
150
  }
151
151
  }
152
152
  if (events.length > 0) {
153
- return processDevices(from, to, slice, events, routes, userData)
153
+ return processDevices(from, to, devices, events, routes, userData)
154
154
  }
155
155
  return []
156
156
  }