SM-1146: Total counts API paths update
This commit is contained in:
parent
8793cc0267
commit
c725d53d1a
|
@ -48,13 +48,10 @@ export class ProjectService {
|
|||
return await this.createProjectsListView(organizationId, results.data);
|
||||
}
|
||||
|
||||
async getProjectCounts(
|
||||
organizationId: string,
|
||||
projectId: string,
|
||||
): Promise<ProjectCountsResponse> {
|
||||
async getProjectCounts(projectId: string): Promise<ProjectCountsResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"GET",
|
||||
"/organizations/" + organizationId + "/projects/" + projectId + "/sm-counts",
|
||||
"/projects/" + projectId + "/sm-counts",
|
||||
null,
|
||||
true,
|
||||
true,
|
||||
|
|
|
@ -75,11 +75,7 @@ export class ProjectComponent implements OnInit, OnDestroy {
|
|||
this.secretService.secret$.pipe(startWith(null)),
|
||||
this.accessPolicyService.accessPolicy$.pipe(startWith(null)),
|
||||
this.serviceAccountService.serviceAccount$.pipe(startWith(null)),
|
||||
]).pipe(
|
||||
switchMap(([params]) =>
|
||||
this.projectService.getProjectCounts(params.organizationId, params.projectId),
|
||||
),
|
||||
);
|
||||
]).pipe(switchMap(([params]) => this.projectService.getProjectCounts(params.projectId)));
|
||||
|
||||
combineLatest([projectId$, organization$, projectCounts$])
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
|
|
|
@ -57,9 +57,7 @@ export class ServiceAccountComponent implements OnInit, OnDestroy {
|
|||
this.accessService.accessToken$.pipe(startWith(null)),
|
||||
this.onChange$,
|
||||
]).pipe(
|
||||
switchMap(([params, _]) =>
|
||||
this.serviceAccountService.getCounts(params.organizationId, params.serviceAccountId),
|
||||
),
|
||||
switchMap(([params, _]) => this.serviceAccountService.getCounts(params.serviceAccountId)),
|
||||
);
|
||||
|
||||
combineLatest([this.serviceAccount$, serviceAccountCounts$])
|
||||
|
|
|
@ -71,13 +71,10 @@ export class ServiceAccountService {
|
|||
return await this.createServiceAccountView(orgKey, new ServiceAccountResponse(r));
|
||||
}
|
||||
|
||||
async getCounts(
|
||||
organizationId: string,
|
||||
serviceAccountId: string,
|
||||
): Promise<ServiceAccountCountsResponse> {
|
||||
async getCounts(serviceAccountId: string): Promise<ServiceAccountCountsResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"GET",
|
||||
"/organizations/" + organizationId + "/service-accounts/" + serviceAccountId + "/sm-counts",
|
||||
"/service-accounts/" + serviceAccountId + "/sm-counts",
|
||||
null,
|
||||
true,
|
||||
true,
|
||||
|
|
Loading…
Reference in New Issue