fleetmap-reports 2.0.91 → 2.0.92

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.91",
3
+ "version": "2.0.92",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -126,8 +126,9 @@ async function createSpeedingReportByDriver (from, to, userData, traccarInstance
126
126
 
127
127
  async function getEvents (traccarInstance, from, to, devices, userData, deviceCount, totalDevices, sliceSize) {
128
128
  if (processServerSide()) {
129
+ const cookie = await axios.get('/pinmeapi/cookie/get', { withCredentials: true }).then(d => d.data)
129
130
  const url = `https://${getServerHost()}/pinmeapi/reports/speeding-report/getEvents`
130
- return axios.post(url, { from, to, devices, userData, deviceCount, totalDevices, sliceSize }, { withCredentials: true }).then(d => d.data)
131
+ return axios.post(url, { from, to, devices, userData, deviceCount, totalDevices, sliceSize, cookie }, { withCredentials: true }).then(d => d.data)
131
132
  } else {
132
133
  const geofencesFeatures = userData.geofences.filter(g => g.area.startsWith('POLYGON') &&
133
134
  g.attributes.speedLimit).map(g => convertToFeature(g))