ti2-ventrata 1.0.14 → 1.0.15

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.
Files changed (2) hide show
  1. package/index.js +3 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -239,24 +239,19 @@ class Plugin {
239
239
  token: {
240
240
  apiKey,
241
241
  endpoint,
242
- octoEnv,
243
- acceptLanguage,
244
242
  },
245
243
  }) {
246
- const url = `${endpoint || this.endpoint}/supplier`;
244
+ const url = `${endpoint || this.endpoint}/whoami?token=${apiKey}`;
247
245
  const headers = getHeaders({
248
246
  apiKey,
249
- endpoint,
250
- octoEnv,
251
- acceptLanguage,
252
247
  });
253
248
  try {
254
- const results = R.path(['data', 'destinations'], await axios({
249
+ const connectionId = R.path(['data', 'connection', 'id'], await axios({
255
250
  method: 'get',
256
251
  url,
257
252
  headers,
258
253
  }));
259
- return Array.isArray(results);
254
+ return /[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/.test(connectionId);
260
255
  } catch (err) {
261
256
  return false;
262
257
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ti2-ventrata",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Ventrata's TI2 Plugin",
5
5
  "main": "index.js",
6
6
  "scripts": {