mirror of
https://github.com/UA-Fediland/synapse-admin.git
synced 2024-11-09 16:24:51 +00:00
Fix user create/update url
Change-Id: I33ff191f7e598c29e0b034d5079e9adf05ff80ae
This commit is contained in:
parent
07e7ed98b5
commit
2163c4dfc8
1 changed files with 4 additions and 7 deletions
|
@ -142,11 +142,11 @@ 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 jsonClient(`${homeserver_url}/${params.id}`, {
|
return jsonClient(`${homeserver_url}/${params.data.id}`, {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
body: JSON.stringify(params.data, filterNullValues),
|
body: JSON.stringify(params.data, filterNullValues),
|
||||||
}).then(({ json }) => ({
|
}).then(({ json }) => ({
|
||||||
data: json,
|
data: res.map(json),
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -174,14 +174,11 @@ 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 jsonClient(`${homeserver_url}/${params.id}`, {
|
return jsonClient(`${homeserver_url}/${params.data.id}`, {
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
body: JSON.stringify(params.data, filterNullValues),
|
body: JSON.stringify(params.data, filterNullValues),
|
||||||
}).then(({ json }) => ({
|
}).then(({ json }) => ({
|
||||||
data: {
|
data: res.map(json),
|
||||||
...params.data,
|
|
||||||
id: json.id,
|
|
||||||
},
|
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue