From f74249073a02ff12586fdc24ca4fac2fcbe5c892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E8=BF=9B?= Date: Sat, 9 Jul 2022 10:04:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'src/synapse/dataProvider.?= =?UTF-8?q?js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/synapse/dataProvider.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/synapse/dataProvider.js b/src/synapse/dataProvider.js index 740b046..9fd35b0 100644 --- a/src/synapse/dataProvider.js +++ b/src/synapse/dataProvider.js @@ -157,6 +157,21 @@ const resourceMap = { return json.total; }, }, + + user_p3url: { + + path: "/_synapse/admin/v1/statistics/users/media", + map: usms => ({ + ...usms, + id: usms.user_id, + }), + data: "user_p3url", + total: json => { + return json.total; + }, + + }, + users_media: { map: um => ({ ...um, @@ -294,17 +309,6 @@ const resourceMap = { delete: params => ({ endpoint: `/_synapse/admin/v1/registration_tokens/${params.id}`, }), - }, - p3url: { - path: "/_synapse/admin/v1/registration_tokens", - map: rt => ({ - ...rt, - id: rt.token, - }), - data: "p3url", - total: json => { - return json.total; - }, } };