epg-grabber 0.25.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils.js +8 -6
package/package.json
CHANGED
package/src/utils.js
CHANGED
|
@@ -70,9 +70,10 @@ utils.createClient = function (config) {
|
|
|
70
70
|
client.interceptors.response.use(
|
|
71
71
|
function (response) {
|
|
72
72
|
if (config.debug) {
|
|
73
|
-
const data =
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
const data =
|
|
74
|
+
utils.isObject(response.data) || Array.isArray(response.data)
|
|
75
|
+
? JSON.stringify(response.data)
|
|
76
|
+
: response.data.toString()
|
|
76
77
|
console.log(
|
|
77
78
|
'Response:',
|
|
78
79
|
JSON.stringify(
|
|
@@ -315,9 +316,10 @@ utils.getUTCDate = function (d = null) {
|
|
|
315
316
|
}
|
|
316
317
|
|
|
317
318
|
utils.parseResponse = async (item, response, config) => {
|
|
318
|
-
const content =
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
const content =
|
|
320
|
+
utils.isObject(response.data) || Array.isArray(response.data)
|
|
321
|
+
? JSON.stringify(response.data)
|
|
322
|
+
: response.data.toString()
|
|
321
323
|
const buffer = Buffer.from(content, 'utf8')
|
|
322
324
|
const data = merge(item, config, {
|
|
323
325
|
content,
|