diff options
| author | Haishan <[email protected]> | 2018-12-06 00:18:11 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2018-12-07 00:19:55 +0800 |
| commit | 8c5ef3e276f7c8c672601ad98ff9c1c5e1b5c2a3 (patch) | |
| tree | c0bffbacaed4e84c3191fb84d628b19487382a4d /src/api | |
| parent | 3584ff617966af35ddd0fd45ef2df7cdfb8f5071 (diff) | |
change: use PATCH for config update API
Diffstat (limited to 'src/api')
| -rw-r--r-- | src/api/configs.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/api/configs.js b/src/api/configs.js index 8889ad0..bc6df8f 100644 --- a/src/api/configs.js +++ b/src/api/configs.js @@ -11,11 +11,15 @@ export async function fetchConfigs(apiConfig) { return await fetch(url + endpoint, init); } +// TODO support PUT /configs +// req body +// { Path: string } + export async function updateConfigs(apiConfig, o) { const { url, init } = getURLAndInit(apiConfig); return await fetch(url + endpoint, { ...init, - method: 'PUT', + method: 'PATCH', // mode: 'cors', body: JSON.stringify(o) }); |
