aboutsummaryrefslogtreecommitdiffstats
path: root/src/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/web')
-rw-r--r--src/web/src/lib/events.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/web/src/lib/events.js b/src/web/src/lib/events.js
index 5c349a08..9f16a66f 100644
--- a/src/web/src/lib/events.js
+++ b/src/web/src/lib/events.js
@@ -1,7 +1,10 @@
import api from './api';
export const list = async ({ offset, limit }) => {
- const response = (await api.get(`/events?offset=${offset}&limit=${limit}`))
- .data;
- return response;
+ const response = await api.get(`/events?offset=${offset}&limit=${limit}`);
+
+ const events = response.data;
+ const totalCount = response.headers['x-total-count'];
+
+ return { events, totalCount };
};