monkey-front-core 0.0.309 → 0.0.311
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/services/storage/monkeyecx-token-storage.service.mjs +14 -5
- package/fesm2015/monkey-front-core.mjs +13 -4
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +13 -4
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/services/storage/monkeyecx-token-storage.service.d.ts +0 -1
- package/monkey-front-core-0.0.311.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.309.tgz +0 -0
|
@@ -3610,7 +3610,6 @@ class MonkeyEcxTokenStorageService {
|
|
|
3610
3610
|
constructor(monkeyecxConfigService, store) {
|
|
3611
3611
|
this.monkeyecxConfigService = monkeyecxConfigService;
|
|
3612
3612
|
this.store = store;
|
|
3613
|
-
this.config = null;
|
|
3614
3613
|
this.token = {
|
|
3615
3614
|
username: '',
|
|
3616
3615
|
program: '',
|
|
@@ -3631,9 +3630,6 @@ class MonkeyEcxTokenStorageService {
|
|
|
3631
3630
|
};
|
|
3632
3631
|
this.token$ = new BehaviorSubject(null);
|
|
3633
3632
|
this.me$ = new BehaviorSubject(null);
|
|
3634
|
-
this.monkeyecxConfigService.config().subscribe((_) => {
|
|
3635
|
-
this.config = _;
|
|
3636
|
-
});
|
|
3637
3633
|
}
|
|
3638
3634
|
setAllTokens(token) {
|
|
3639
3635
|
const { token$, store } = this;
|
|
@@ -3656,25 +3652,38 @@ class MonkeyEcxTokenStorageService {
|
|
|
3656
3652
|
token$.next(token);
|
|
3657
3653
|
}
|
|
3658
3654
|
async getAllTokens() {
|
|
3655
|
+
console.log('111111');
|
|
3659
3656
|
try {
|
|
3660
3657
|
const { store, monkeyecxConfigService } = this;
|
|
3658
|
+
console.log('22222');
|
|
3661
3659
|
const username = localStorage.getItem('username');
|
|
3660
|
+
console.log('33333');
|
|
3662
3661
|
let data = {
|
|
3663
3662
|
username: username || '',
|
|
3664
3663
|
program: ''
|
|
3665
3664
|
};
|
|
3665
|
+
console.log('4444');
|
|
3666
3666
|
if (username) {
|
|
3667
|
+
console.log('5555');
|
|
3667
3668
|
data = await store.select(select({ username })).pipe(take(1)).toPromise();
|
|
3669
|
+
console.log('data');
|
|
3670
|
+
console.log(data);
|
|
3668
3671
|
delete data?.me;
|
|
3669
3672
|
}
|
|
3673
|
+
console.log('6666');
|
|
3670
3674
|
const config = await monkeyecxConfigService.config()
|
|
3671
3675
|
.pipe(first((val) => {
|
|
3676
|
+
console.log('val');
|
|
3677
|
+
console.log(val);
|
|
3672
3678
|
return !!val && JSON.stringify(val) !== '{}';
|
|
3673
3679
|
}))
|
|
3674
3680
|
.toPromise();
|
|
3681
|
+
console.log('7777');
|
|
3675
3682
|
if (data && !data?.program && config?.program) {
|
|
3676
3683
|
data.program = config?.program?.token;
|
|
3677
3684
|
}
|
|
3685
|
+
console.log('data');
|
|
3686
|
+
console.log(data);
|
|
3678
3687
|
return data;
|
|
3679
3688
|
}
|
|
3680
3689
|
catch (e) {
|