fleetmap-reports 2.0.267 → 2.0.268

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.267",
3
+ "version": "2.0.268",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -54,13 +54,13 @@ async function createLocationReportByDriver (from, to, userData, traccar) {
54
54
 
55
55
  const sliced = automaticReports.sliceArray(devices, 1)
56
56
  const deviceCount = 0
57
- const promises = sliced.map(slice => _process(traccar, from, to, slice, deviceCount, devices, userData))
57
+ const promises = sliced.map(slice => _getDriverRoute(traccar, from, to, slice, deviceCount, devices, userData))
58
58
  const result = await Promise.all(promises)
59
59
  return { drivers: result.flat() }
60
60
  }
61
61
 
62
- async function _process (traccar, from, to, slice, deviceCount, devices, userData) {
63
- const url = `https://${process.env.SERVER_HOST}/pinmeapi/process-report/get-driver-route'`
62
+ async function _getDriverRoute (traccar, from, to, slice, deviceCount, devices, userData) {
63
+ const url = `https://${getDriverRoute.env.SERVER_HOST}/pinmeapi/process-report/get-driver-route'`
64
64
  return traccar.axios.post(url, {
65
65
  from,
66
66
  to,
@@ -71,7 +71,7 @@ async function _process (traccar, from, to, slice, deviceCount, devices, userDat
71
71
  }).then(d => d.data)
72
72
  }
73
73
 
74
- async function process (traccar, from, to, slice, deviceCount, devices, userData) {
74
+ async function getDriverRoute (traccar, from, to, slice, deviceCount, devices, userData) {
75
75
  const allInOne = await traccarHelper.getAllInOne(
76
76
  traccar, from, to, slice, true, false, false, false,
77
77
  deviceCount,
@@ -496,4 +496,4 @@ exports.create = createLocationReport
496
496
  exports.exportToPDF = exportLocationReportToPDF
497
497
  exports.exportToExcel = exportLocationReportToExcel
498
498
  exports.getDigitalPortValue = getDigitalPortValue
499
- exports.process = process
499
+ exports.getDriverRoute = getDriverRoute