mirror of
https://github.com/valitydev/dashboard.git
synced 2024-11-06 02:25:23 +00:00
fix
This commit is contained in:
parent
3cc96f0daf
commit
aca28e4de4
@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
|
|||||||
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||||
import { Organization, Member, RoleId } from '@vality/swag-organizations';
|
import { Organization, Member, RoleId } from '@vality/swag-organizations';
|
||||||
import { Observable, ReplaySubject, EMPTY, concat, defer, combineLatest, of, throwError } from 'rxjs';
|
import { Observable, ReplaySubject, EMPTY, concat, defer, combineLatest, of, throwError } from 'rxjs';
|
||||||
import { switchMap, shareReplay, catchError, map, tap } from 'rxjs/operators';
|
import { switchMap, shareReplay, catchError, map, tap, withLatestFrom } from 'rxjs/operators';
|
||||||
|
|
||||||
import { OrgsService, MembersService } from '@dsh/api/organizations';
|
import { OrgsService, MembersService } from '@dsh/api/organizations';
|
||||||
|
|
||||||
@ -38,6 +38,9 @@ export class ContextService {
|
|||||||
)
|
)
|
||||||
).pipe(
|
).pipe(
|
||||||
switchMap((orgId) => this.organizationsService.getOrg({ orgId })),
|
switchMap((orgId) => this.organizationsService.getOrg({ orgId })),
|
||||||
|
withLatestFrom(this.keycloakTokenInfoService.userID$),
|
||||||
|
// TODO: temporary replace party with user id
|
||||||
|
map(([org, party]) => ({ ...org, party })),
|
||||||
untilDestroyed(this),
|
untilDestroyed(this),
|
||||||
shareReplay(1)
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user