|
|
@ -200,10 +200,14 @@ export async function patch (operation, options) {
|
|
|
|
if (requestConfig.resource !== undefined && requestConfig.resourceId !== undefined) {
|
|
|
|
if (requestConfig.resource !== undefined && requestConfig.resourceId !== undefined) {
|
|
|
|
path = `api/${requestConfig.resource}/${requestConfig.resourceId}`
|
|
|
|
path = `api/${requestConfig.resource}/${requestConfig.resourceId}`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const config = {
|
|
|
|
|
|
|
|
headers: requestConfig.headers,
|
|
|
|
|
|
|
|
...(requestConfig.params ? { params: requestConfig.params } : {})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
return await httpApi.patch(path, [body], {
|
|
|
|
return await httpApi.patch(path, [body], config)
|
|
|
|
headers: requestConfig.headers
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
handleResponseError(err)
|
|
|
|
handleResponseError(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|