diff options
Diffstat (limited to 'modern/src/reports/ChartReportPage.js')
-rw-r--r-- | modern/src/reports/ChartReportPage.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modern/src/reports/ChartReportPage.js b/modern/src/reports/ChartReportPage.js index 00edf7b6..4605a5b9 100644 --- a/modern/src/reports/ChartReportPage.js +++ b/modern/src/reports/ChartReportPage.js @@ -37,9 +37,11 @@ const ChartReportPage = () => { const maxValue = Math.max(...values); const valueRange = maxValue - minValue; - const handleSubmit = useCatch(async ({ deviceId, from, to, mail, headers }) => { - const query = new URLSearchParams({ deviceId, from, to, mail }); - const response = await fetch(`/api/reports/route?${query.toString()}`, { headers }); + const handleSubmit = useCatch(async ({ deviceId, from, to }) => { + const query = new URLSearchParams({ deviceId, from, to }); + const response = await fetch(`/api/reports/route?${query.toString()}`, { + headers: { Accept: 'application/json' }, + }); if (response.ok) { const positions = await response.json(); const formattedPositions = positions.map((position) => { |