|
|
|
@ -142,11 +142,11 @@ const dataProvider = {
|
|
|
|
|
|
|
|
|
|
const res = resourceMap[resource];
|
|
|
|
|
const homeserver_url = "https://" + homeserver + res.path;
|
|
|
|
|
return jsonClient(`${homeserver_url}/${params.id}`, {
|
|
|
|
|
return jsonClient(`${homeserver_url}/${params.data.id}`, {
|
|
|
|
|
method: "PUT",
|
|
|
|
|
body: JSON.stringify(params.data, filterNullValues),
|
|
|
|
|
}).then(({ json }) => ({
|
|
|
|
|
data: json,
|
|
|
|
|
data: res.map(json),
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -174,14 +174,11 @@ const dataProvider = {
|
|
|
|
|
|
|
|
|
|
const res = resourceMap[resource];
|
|
|
|
|
const homeserver_url = "https://" + homeserver + res.path;
|
|
|
|
|
return jsonClient(`${homeserver_url}/${params.id}`, {
|
|
|
|
|
return jsonClient(`${homeserver_url}/${params.data.id}`, {
|
|
|
|
|
method: "PUT",
|
|
|
|
|
body: JSON.stringify(params.data, filterNullValues),
|
|
|
|
|
}).then(({ json }) => ({
|
|
|
|
|
data: {
|
|
|
|
|
...params.data,
|
|
|
|
|
id: json.id,
|
|
|
|
|
},
|
|
|
|
|
data: res.map(json),
|
|
|
|
|
}));
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|