@radio-retail/api-client
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -40,7 +40,6 @@ const getData = require('../utils/get-raw-data'); | ||
patch(id, body = {}, prevConfig = {}, extractNestedData = true) { | ||
const config = { | ||
headers: { | ||
'Content-Type': 'application/merge-patch+json' | ||
}, | ||
...prevConfig | ||
const config = { ...prevConfig, | ||
headers: { ...(prevConfig.headers || {}), | ||
'Content-Type': prevConfig.type === 'json' ? 'application/json-patch+json' : 'application/merge-patch+json' | ||
} | ||
}; | ||
@@ -47,0 +46,0 @@ return instance.patch(`${baseRoute}/${id}`, body, config).then(getData(!extractNestedData)); |
{ | ||
"name": "@radio-retail/api-client", | ||
"description": "Radio Retail API client", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
22671
520