fleetmap-reports 2.0.89 → 2.0.91
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 +1 -1
- package/src/util/utils.js +3 -2
package/package.json
CHANGED
package/src/util/utils.js
CHANGED
|
@@ -3,6 +3,7 @@ const {
|
|
|
3
3
|
getUserPartner
|
|
4
4
|
} = require('fleetmap-partners')
|
|
5
5
|
const messages = require('../../lang')
|
|
6
|
+
const axios = require('axios').default
|
|
6
7
|
const distance = require('@turf/distance')
|
|
7
8
|
const { devicesToProcess } = require('./device')
|
|
8
9
|
|
|
@@ -230,10 +231,10 @@ function weekDaySelected (date, weekDays) {
|
|
|
230
231
|
(date.getDay() === 6 && weekDays.saturday))
|
|
231
232
|
}
|
|
232
233
|
|
|
233
|
-
async function executeServerSide (type, sliced, from, to, userData, totalItems,
|
|
234
|
+
async function executeServerSide (type, sliced, from, to, userData, totalItems, traccar, maxRequests = 10) {
|
|
234
235
|
let itemsCount = 0
|
|
235
236
|
console.log('PROGRESS_PERC:1')
|
|
236
|
-
const cookie = await axios.get(
|
|
237
|
+
const cookie = await axios.get('/pinmeapi/cookie/get', { withCredentials: true }).then(d => d.data)
|
|
237
238
|
const reportData = []
|
|
238
239
|
for (let i = 0; i < sliced.length; i += maxRequests) {
|
|
239
240
|
const _sliced = sliced.slice(i, i + maxRequests)
|