roboto-js 1.4.21 → 1.4.22
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/dist/cjs/rbt_api.cjs +15 -8
- package/dist/esm/rbt_api.js +4 -0
- package/package.json +1 -1
- package/src/rbt_api.js +5 -0
package/dist/cjs/rbt_api.cjs
CHANGED
|
@@ -483,22 +483,29 @@ var RbtApi = exports["default"] = /*#__PURE__*/function () {
|
|
|
483
483
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
484
484
|
while (1) switch (_context11.prev = _context11.next) {
|
|
485
485
|
case 0:
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
486
|
+
if (this.appServiceHost) {
|
|
487
|
+
_context11.next = 3;
|
|
488
|
+
break;
|
|
489
|
+
}
|
|
490
|
+
console.warn('appServiceHost not initialized');
|
|
491
|
+
return _context11.abrupt("return", false);
|
|
489
492
|
case 3:
|
|
493
|
+
_context11.prev = 3;
|
|
494
|
+
_context11.next = 6;
|
|
495
|
+
return this.axios.post('/user_service/refreshAuthToken', [authtoken]);
|
|
496
|
+
case 6:
|
|
490
497
|
response = _context11.sent;
|
|
491
498
|
debugger;
|
|
492
499
|
return _context11.abrupt("return", response.data);
|
|
493
|
-
case 8:
|
|
494
|
-
_context11.prev = 8;
|
|
495
|
-
_context11.t0 = _context11["catch"](0);
|
|
496
|
-
this._handleError(_context11.t0);
|
|
497
500
|
case 11:
|
|
501
|
+
_context11.prev = 11;
|
|
502
|
+
_context11.t0 = _context11["catch"](3);
|
|
503
|
+
this._handleError(_context11.t0);
|
|
504
|
+
case 14:
|
|
498
505
|
case "end":
|
|
499
506
|
return _context11.stop();
|
|
500
507
|
}
|
|
501
|
-
}, _callee11, this, [[
|
|
508
|
+
}, _callee11, this, [[3, 11]]);
|
|
502
509
|
}));
|
|
503
510
|
function refreshAuthToken(_x7) {
|
|
504
511
|
return _refreshAuthToken.apply(this, arguments);
|
package/dist/esm/rbt_api.js
CHANGED
|
@@ -215,6 +215,10 @@ export default class RbtApi {
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
async refreshAuthToken(authtoken) {
|
|
218
|
+
if (!this.appServiceHost) {
|
|
219
|
+
console.warn('appServiceHost not initialized');
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
218
222
|
try {
|
|
219
223
|
const response = await this.axios.post('/user_service/refreshAuthToken', [authtoken]);
|
|
220
224
|
debugger;
|
package/package.json
CHANGED
package/src/rbt_api.js
CHANGED
|
@@ -275,6 +275,11 @@ export default class RbtApi {
|
|
|
275
275
|
|
|
276
276
|
async refreshAuthToken(authtoken){
|
|
277
277
|
|
|
278
|
+
if(!this.appServiceHost){
|
|
279
|
+
console.warn('appServiceHost not initialized');
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
|
|
278
283
|
try {
|
|
279
284
|
|
|
280
285
|
const response = await this.axios.post('/user_service/refreshAuthToken', [authtoken]);
|