addigy 2.5.0 → 2.6.0
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/index.js +3 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -932,6 +932,7 @@ class Addigy {
|
|
|
932
932
|
return JSON.parse(res.body);
|
|
933
933
|
}
|
|
934
934
|
async getCustomFacts(authObject) {
|
|
935
|
+
var _a;
|
|
935
936
|
const res = await this._addigyRequest('https://app-prod.addigy.com/api/services/facts/custom', {
|
|
936
937
|
headers: {
|
|
937
938
|
Cookie: `auth_token=${authObject.authToken};`,
|
|
@@ -939,7 +940,8 @@ class Addigy {
|
|
|
939
940
|
},
|
|
940
941
|
method: 'GET',
|
|
941
942
|
});
|
|
942
|
-
|
|
943
|
+
const results = JSON.parse(res.body);
|
|
944
|
+
return (_a = results.custom_facts) !== null && _a !== void 0 ? _a : [];
|
|
943
945
|
}
|
|
944
946
|
async getCustomFactByName(authObject, name) {
|
|
945
947
|
const facts = await this.getCustomFacts(authObject);
|