@aakash58/chatbot 1.1.10 → 1.1.11
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.
|
@@ -338,12 +338,13 @@ class HttpService {
|
|
|
338
338
|
http;
|
|
339
339
|
tokenStorage;
|
|
340
340
|
// @BlockUI() blockUI!: NgBlockUI;
|
|
341
|
-
apiUrl
|
|
341
|
+
get apiUrl() {
|
|
342
|
+
return `${AppConst?.data?.apiBaseUrl}${AppConst?.data?.apiSegment}`;
|
|
343
|
+
}
|
|
342
344
|
constructor(http, tokenStorage) {
|
|
343
345
|
this.http = http;
|
|
344
346
|
this.tokenStorage = tokenStorage;
|
|
345
|
-
|
|
346
|
-
Logger.log('HttpService: Initialized', this.apiUrl);
|
|
347
|
+
Logger.log('HttpService: Initialized');
|
|
347
348
|
}
|
|
348
349
|
get(url, param, nestedParam = false, showLoader = false, refresh = true, headers) {
|
|
349
350
|
// if (showLoader && !this.blockUI.isActive) {
|
|
@@ -520,12 +521,20 @@ class AuthService {
|
|
|
520
521
|
cryptoHelper;
|
|
521
522
|
tokenStorage;
|
|
522
523
|
router;
|
|
523
|
-
apiUrl;
|
|
524
|
-
storageKey;
|
|
525
|
-
secretKey;
|
|
526
|
-
companyCode;
|
|
527
524
|
jwtHelper = new JwtHelperService();
|
|
528
525
|
config = inject(DOOHBOT_ADVANCED_CONFIG, { optional: true });
|
|
526
|
+
get apiUrl() {
|
|
527
|
+
return `${AppConst?.data?.apiBaseUrl}${AppConst?.data?.apiSegment}`;
|
|
528
|
+
}
|
|
529
|
+
get storageKey() {
|
|
530
|
+
return AppConst?.data?.storageKey;
|
|
531
|
+
}
|
|
532
|
+
get secretKey() {
|
|
533
|
+
return AppConst?.data?.secretKey;
|
|
534
|
+
}
|
|
535
|
+
get companyCode() {
|
|
536
|
+
return AppConst?.data?.companyCode;
|
|
537
|
+
}
|
|
529
538
|
// Reactive Authentication State
|
|
530
539
|
authStatusSubject = new BehaviorSubject('unauthenticated');
|
|
531
540
|
authStatus$ = this.authStatusSubject.asObservable();
|
|
@@ -538,11 +547,7 @@ class AuthService {
|
|
|
538
547
|
this.cryptoHelper = cryptoHelper;
|
|
539
548
|
this.tokenStorage = tokenStorage;
|
|
540
549
|
this.router = router;
|
|
541
|
-
|
|
542
|
-
this.storageKey = AppConst?.data?.storageKey;
|
|
543
|
-
this.secretKey = AppConst?.data?.secretKey;
|
|
544
|
-
this.companyCode = AppConst?.data?.companyCode;
|
|
545
|
-
this.cryptoHelper.setSecretKey(this.secretKey);
|
|
550
|
+
// Properties are now dynamic getters
|
|
546
551
|
}
|
|
547
552
|
getLoggedInUserName() {
|
|
548
553
|
const username = this.tokenStorage.get('username');
|