fleetmap-reports 1.0.378 → 1.0.379

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": "1.0.378",
3
+ "version": "1.0.379",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -72,7 +72,8 @@ async function createSpeedingReportByDevice(from, to, userData, traccarInstance)
72
72
 
73
73
  devices.sort((a, b) => (a.name > b.name) ? 1 : -1)
74
74
 
75
- const routes = await traccarHelper.getRoute(traccarInstance, from, to, devices)
75
+ const allInOne = await traccarHelper.getAllInOne(traccarInstance, from, to, devices, true, false, false, false)
76
+ const routes = allInOne.route
76
77
  const events = []
77
78
  if(!userData.useVehicleSpeedLimit && userData.customSpeed){
78
79
  events.push(...await getCustomSpeedLimitEvents(devices, routes, userData.customSpeed))
@@ -104,7 +105,9 @@ async function createSpeedingReportByDriver(from, to, userData, traccarInstance)
104
105
  return { drivers: [] }
105
106
  }
106
107
 
107
- const routes = await traccarHelper.getRoute(traccarInstance, from, to, devices)
108
+ const allInOne = await traccarHelper.getAllInOne(traccarInstance, from, to, devices, true, false, false, false)
109
+ const routes = allInOne.route
110
+
108
111
  const events = []
109
112
  if(!userData.useVehicleSpeedLimit && userData.customSpeed){
110
113
  events.push(...await getCustomSpeedLimitEvents(devices, routes, userData.customSpeed))