aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/EventReportPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/reports/EventReportPage.js')
-rw-r--r--modern/src/reports/EventReportPage.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/modern/src/reports/EventReportPage.js b/modern/src/reports/EventReportPage.js
index 447adaef..61b55fcc 100644
--- a/modern/src/reports/EventReportPage.js
+++ b/modern/src/reports/EventReportPage.js
@@ -54,10 +54,8 @@ const EventReportPage = () => {
const [eventTypes, setEventTypes] = useState(['allEvents']);
const [items, setItems] = useState([]);
- const handleSubmit = useCatch(async (deviceId, from, to, mail, headers) => {
- const query = new URLSearchParams({
- deviceId, from, to, mail,
- });
+ const handleSubmit = useCatch(async ({ deviceId, from, to, mail, headers }) => {
+ const query = new URLSearchParams({ deviceId, from, to, mail });
eventTypes.forEach((it) => query.append('type', it));
const response = await fetch(`/api/reports/events?${query.toString()}`, { headers });
if (response.ok) {