fleetmap-reports 2.0.249 → 2.0.250
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/traccar.js +7 -1
package/package.json
CHANGED
package/src/util/traccar.js
CHANGED
|
@@ -100,8 +100,14 @@ async function getItems (traccar, u, _chunk, counter, devicesPerRequest, ignoreP
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
function getCookie (traccar) {
|
|
104
|
+
return (traccar.axios.defaults.headers && traccar.axios.defaults.headers.cookie) ||
|
|
105
|
+
(traccar.axios.defaults.headers && traccar.axios.defaults.headers.common && traccar.axios.defaults.headers.common.cookie) ||
|
|
106
|
+
(require('axios').defaults.headers && require('axios').defaults.headers.common && require('axios').defaults.headers.common.cookie)
|
|
107
|
+
}
|
|
108
|
+
|
|
103
109
|
function streamJson (traccar, u, filter) {
|
|
104
|
-
const cookie = traccar
|
|
110
|
+
const cookie = getCookie(traccar)
|
|
105
111
|
return piscina.run({
|
|
106
112
|
url: traccar.axios.defaults.baseURL + u,
|
|
107
113
|
cookie,
|