mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-25 09:05:32 +03:00
Update total
in dataProvider (#101)
This commit is contained in:
parent
2f96951c19
commit
b184954ffa
1 changed files with 6 additions and 2 deletions
|
@ -87,7 +87,9 @@ const resourceMap = {
|
||||||
id: d.device_id,
|
id: d.device_id,
|
||||||
}),
|
}),
|
||||||
data: "devices",
|
data: "devices",
|
||||||
total: json => json.devices.length,
|
total: json => {
|
||||||
|
return json.total;
|
||||||
|
},
|
||||||
reference: id => ({
|
reference: id => ({
|
||||||
endpoint: `/_synapse/admin/v2/users/${id}/devices`,
|
endpoint: `/_synapse/admin/v2/users/${id}/devices`,
|
||||||
}),
|
}),
|
||||||
|
@ -111,7 +113,9 @@ const resourceMap = {
|
||||||
endpoint: `/_synapse/admin/v1/rooms/${id}/members`,
|
endpoint: `/_synapse/admin/v1/rooms/${id}/members`,
|
||||||
}),
|
}),
|
||||||
data: "members",
|
data: "members",
|
||||||
total: json => json.members.length,
|
total: json => {
|
||||||
|
return json.total;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
servernotices: {
|
servernotices: {
|
||||||
map: n => ({ id: n.event_id }),
|
map: n => ({ id: n.event_id }),
|
||||||
|
|
Loading…
Reference in a new issue