@meltwater/conversations-api-services 1.0.34 → 1.0.35
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.
|
@@ -119,7 +119,7 @@ async function unhide(token, externalId, logger) {
|
|
|
119
119
|
const response = await postApi(`${FACEBOOK_URL}/${(0, _externalIdHelpers.removePrefix)(externalId)}`, token, {
|
|
120
120
|
is_hidden: false
|
|
121
121
|
}, logger);
|
|
122
|
-
|
|
122
|
+
(0, _loggerHelpers.loggerInfo)(`Native Facebook API Unhide Response`, {
|
|
123
123
|
responseBody: JSON.stringify(response.body)
|
|
124
124
|
});
|
|
125
125
|
return response.body;
|
|
@@ -309,7 +309,7 @@ async function postApi(apiUrl, accessToken, payload, logger) {
|
|
|
309
309
|
throw err;
|
|
310
310
|
}
|
|
311
311
|
if (response.status !== 200) {
|
|
312
|
-
|
|
312
|
+
(0, _loggerHelpers.loggerError)(logger, `Failed to call facebook api`, {
|
|
313
313
|
responseBody: JSON.stringify(response.body)
|
|
314
314
|
});
|
|
315
315
|
throw new Error(`Failed to call facebook api ${response.body}`);
|
|
@@ -100,7 +100,7 @@ export async function unhide(token, externalId, logger) {
|
|
|
100
100
|
const response = await postApi(`${FACEBOOK_URL}/${removePrefix(externalId)}`, token, {
|
|
101
101
|
is_hidden: false
|
|
102
102
|
}, logger);
|
|
103
|
-
|
|
103
|
+
loggerInfo(`Native Facebook API Unhide Response`, {
|
|
104
104
|
responseBody: JSON.stringify(response.body)
|
|
105
105
|
});
|
|
106
106
|
return response.body;
|
|
@@ -290,7 +290,7 @@ async function postApi(apiUrl, accessToken, payload, logger) {
|
|
|
290
290
|
throw err;
|
|
291
291
|
}
|
|
292
292
|
if (response.status !== 200) {
|
|
293
|
-
|
|
293
|
+
loggerError(logger, `Failed to call facebook api`, {
|
|
294
294
|
responseBody: JSON.stringify(response.body)
|
|
295
295
|
});
|
|
296
296
|
throw new Error(`Failed to call facebook api ${response.body}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meltwater/conversations-api-services",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.35",
|
|
4
4
|
"description": "Repository to contain all conversations api services shared across our services",
|
|
5
5
|
"main": "dist/cjs/data-access/index.js",
|
|
6
6
|
"module": "dist/esm/data-access/index.js",
|
|
@@ -154,7 +154,7 @@ export async function unhide(token, externalId, logger) {
|
|
|
154
154
|
logger
|
|
155
155
|
);
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
loggerInfo(
|
|
158
158
|
`Native Facebook API Unhide Response`,
|
|
159
159
|
{ responseBody: JSON.stringify(response.body) }
|
|
160
160
|
);
|
|
@@ -481,7 +481,7 @@ async function postApi(apiUrl, accessToken, payload, logger) {
|
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
if (response.status !== 200) {
|
|
484
|
-
|
|
484
|
+
loggerError(logger,
|
|
485
485
|
`Failed to call facebook api`,
|
|
486
486
|
{ responseBody: JSON.stringify(response.body) }
|
|
487
487
|
);
|