From e62ac37b7ae87197182a9008df2a9484e4a7edf2 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Mon, 10 Feb 2020 19:20:20 +0100 Subject: [PATCH] fix HTTP DELETE --- src/synapse/dataProvider.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/synapse/dataProvider.js b/src/synapse/dataProvider.js index 441f813..f136468 100644 --- a/src/synapse/dataProvider.js +++ b/src/synapse/dataProvider.js @@ -207,13 +207,14 @@ const dataProvider = { const res = resourceMap[resource]; const homeserver_url = "https://" + homeserver + res.path; return Promise.all( - params.ids.map(id => jsonClient(`${homeserver_url}/${id}`), { - method: "DELETE", - body: JSON.stringify(params.data, filterNullValues), - }) - ).then(responses => ({ - data: responses.map(({ json }) => json), - })); + params.ids.map(id => jsonClient(`${homeserver_url}/${id}`, { + method: "DELETE", + body: JSON.stringify(params.data, filterNullValues), + }, + ).then(responses => ({ + data: responses.map(({ json }) => json), + }))) + ); }, };