@tiledesk/tiledesk-tybot-connector 2.0.4-rc1 → 2.0.4-rc2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-tybot-connector",
3
- "version": "2.0.4-rc1",
3
+ "version": "2.0.4-rc2",
4
4
  "description": "Tiledesk Tybot connector",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -346,7 +346,7 @@ class DirAssistant {
346
346
  winston.error("(DirAssistant) error: ", err);
347
347
  reject(err);
348
348
  }
349
- winston.debug("(DirAssistant) got response data: ", res.data);
349
+ winston.debug("(DirAssistant) got response data: ", res);
350
350
  resolve();
351
351
  }
352
352
  );
@@ -400,15 +400,8 @@ class DirAssistant {
400
400
  winston.error("(DirAssistant) error: ", err);
401
401
  reject(err);
402
402
  }
403
- else if(res?.status >= 200 && res?.status <= 299) {
404
- winston.debug("(DirAddTags) got response data: ", res.data);
405
- // let return_body = res.data;
406
- resolve(res.data);
407
- }
408
- else {
409
- let status = res?.status;
410
- reject(new Error("Message add status != 200:", status));
411
- }
403
+ winston.debug("(DirAddTags) got response data: ", res);
404
+ resolve(res);
412
405
  }
413
406
  );
414
407
  });
@@ -435,15 +428,8 @@ class DirAssistant {
435
428
  winston.error("(DirAssistant) error: ", err);
436
429
  reject(err);
437
430
  }
438
- else if(res?.status >= 200 && res?.status <= 299) {
439
- winston.debug("(DirAddTags) got response data: ", res.data);
440
- // let return_body = res.data;
441
- resolve(res.data);
442
- }
443
- else {
444
- let status = res?.status;
445
- reject(new Error("Message add status != 200:", status));
446
- }
431
+ winston.debug("(DirAddTags) got response data: ", res);
432
+ resolve(res);
447
433
  }
448
434
  );
449
435
  });
@@ -470,15 +456,8 @@ class DirAssistant {
470
456
  winston.error("(DirAssistant) error: ", err);
471
457
  reject(err);
472
458
  }
473
- else if(res?.status >= 200 && res?.status <= 299) {
474
- winston.debug("(DirAddTags) got response data: ", res.data);
475
- // let return_body = res.data;
476
- resolve(res.data);
477
- }
478
- else {
479
- let status = res?.status;
480
- reject(new Error("Message add status != 200:", status));
481
- }
459
+ winston.debug("(DirAddTags) got response data: ", res);
460
+ resolve(res);
482
461
  }
483
462
  );
484
463
  });