From b184954ffa179fbe4fbdc2a75010361c3fe0edeb Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Thu, 11 Feb 2021 20:20:42 +0100 Subject: [PATCH] Update `total` in dataProvider (#101) --- src/synapse/dataProvider.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/synapse/dataProvider.js b/src/synapse/dataProvider.js index 560bdb9..3df3c9d 100644 --- a/src/synapse/dataProvider.js +++ b/src/synapse/dataProvider.js @@ -87,7 +87,9 @@ const resourceMap = { id: d.device_id, }), data: "devices", - total: json => json.devices.length, + total: json => { + return json.total; + }, reference: id => ({ endpoint: `/_synapse/admin/v2/users/${id}/devices`, }), @@ -111,7 +113,9 @@ const resourceMap = { endpoint: `/_synapse/admin/v1/rooms/${id}/members`, }), data: "members", - total: json => json.members.length, + total: json => { + return json.total; + }, }, servernotices: { map: n => ({ id: n.event_id }),