Fix deleteMany() in dataProvider (#6)
Change-Id: I6ef3abbf3ed7a1860b7c395d91fda8b7e44f4d95
This commit is contained in:
parent
2163c4dfc8
commit
726461aa19
@ -204,13 +204,15 @@ 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),
|
||||
}))
|
||||
)
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user