@vouchfor/sdk 1.1.19 → 1.1.21
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.
|
@@ -15,7 +15,8 @@ class IntegrationService extends BaseIntegrationService {
|
|
|
15
15
|
|
|
16
16
|
authenticate({ applicationId, entityId, mappingId }) {
|
|
17
17
|
if (applicationId) {
|
|
18
|
-
|
|
18
|
+
const entity = entityId ? `/${entityId}` : '';
|
|
19
|
+
return this._request({ path: `applications/${applicationId}/entity` + entity });
|
|
19
20
|
} else if (entityId) {
|
|
20
21
|
return this._request({ path: `entities/${entityId}` });
|
|
21
22
|
} else if (mappingId) {
|
package/lib/shared/utils.js
CHANGED
|
@@ -120,7 +120,11 @@ module.exports = {
|
|
|
120
120
|
body.pipe(req);
|
|
121
121
|
} else {
|
|
122
122
|
if (body) {
|
|
123
|
-
|
|
123
|
+
if (typeof body === 'object') {
|
|
124
|
+
req.write(JSON.stringify(body));
|
|
125
|
+
} else {
|
|
126
|
+
req.write(body);
|
|
127
|
+
}
|
|
124
128
|
}
|
|
125
129
|
req.end();
|
|
126
130
|
}
|