mirror of
https://github.com/etkecc/synapse-admin.git
synced 2024-11-22 07:45:21 +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 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 =>
|
||||||
method: "DELETE",
|
jsonClient(`${homeserver_url}/${id}`, {
|
||||||
body: JSON.stringify(params.data, filterNullValues),
|
method: "DELETE",
|
||||||
})
|
body: JSON.stringify(params.data, filterNullValues),
|
||||||
).then(responses => ({
|
}).then(responses => ({
|
||||||
data: responses.map(({ json }) => json),
|
data: responses.map(({ json }) => json),
|
||||||
}));
|
}))
|
||||||
|
)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue