mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-21 23:35:22 +03:00
Fix deleteMany() in dataProvider (#6)
Change-Id: I6ef3abbf3ed7a1860b7c395d91fda8b7e44f4d95
This commit is contained in:
parent
2163c4dfc8
commit
726461aa19
1 changed files with 9 additions and 7 deletions
|
@ -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 a new issue