fix HTTP DELETE

This commit is contained in:
Lukas Winkler 2020-02-10 19:20:20 +01:00
parent 07e7ed98b5
commit e62ac37b7a
No known key found for this signature in database
GPG Key ID: 54DE4D798D244853

View File

@ -207,13 +207,14 @@ const dataProvider = {
const res = resourceMap[resource]; const res = resourceMap[resource];
const homeserver_url = "https://" + homeserver + res.path; const homeserver_url = "https://" + homeserver + res.path;
return Promise.all( return Promise.all(
params.ids.map(id => jsonClient(`${homeserver_url}/${id}`), { params.ids.map(id => jsonClient(`${homeserver_url}/${id}`, {
method: "DELETE", method: "DELETE",
body: JSON.stringify(params.data, filterNullValues), body: JSON.stringify(params.data, filterNullValues),
}) },
).then(responses => ({ ).then(responses => ({
data: responses.map(({ json }) => json), data: responses.map(({ json }) => json),
})); })))
);
}, },
}; };