monkey-front-core 0.0.369 → 0.0.370
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/esm2020/lib/core/interceptors/monkeyecx-http-config-header.interceptor.mjs +15 -22
- package/fesm2015/monkey-front-core.mjs +13 -20
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +13 -20
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/monkey-front-core-0.0.370.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.369.tgz +0 -0
|
@@ -5409,29 +5409,22 @@ class MonkeyEcxHttpConfigHeaderInterceptor {
|
|
|
5409
5409
|
}
|
|
5410
5410
|
async handle(request) {
|
|
5411
5411
|
const { url } = request;
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
// not to do
|
|
5426
|
-
}
|
|
5427
|
-
} */
|
|
5412
|
+
if (this.authService.isTokenMandatory(url)) {
|
|
5413
|
+
try {
|
|
5414
|
+
await this.config
|
|
5415
|
+
.config()
|
|
5416
|
+
.pipe(first((val) => {
|
|
5417
|
+
return !!val && JSON.stringify(val) !== '{}';
|
|
5418
|
+
}))
|
|
5419
|
+
.toPromise();
|
|
5420
|
+
}
|
|
5421
|
+
catch (e) {
|
|
5422
|
+
// not to do
|
|
5423
|
+
}
|
|
5424
|
+
}
|
|
5428
5425
|
let resp = null;
|
|
5429
|
-
console.log('====> core 2 <====');
|
|
5430
5426
|
try {
|
|
5431
|
-
console.log(url);
|
|
5432
5427
|
resp = await this.authService.getRequestWithHeadersAsync(request);
|
|
5433
|
-
console.log('====> core 3 <====');
|
|
5434
|
-
console.log(resp);
|
|
5435
5428
|
}
|
|
5436
5429
|
catch (e) {
|
|
5437
5430
|
this.errorHandlingService.handleError(e);
|