change: use PATCH for config update API
This commit is contained in:
parent
3584ff6179
commit
8c5ef3e276
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue