Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
anatheka committed Oct 9, 2024
1 parent 26edc2e commit d9e751a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/lib/api/orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export interface ListCertificationTargetsResponse {
targets: CertificationTarget[];
}

export interface ListTargetsOfEvaluationResponse {
export interface ListAuditScopesResponse {
auditScope: AuditScope[];
}

Expand Down Expand Up @@ -476,7 +476,7 @@ export async function removeControlFromScope(
*
* @returns an array of {@link AuditScope}s.
*/
export async function listTargetsOfEvaluation(
export async function listAuditScopes(
serviceId: string,
fetch = window.fetch
): Promise<AuditScope[]> {
Expand All @@ -490,7 +490,7 @@ export async function listTargetsOfEvaluation(
})
.then(throwError)
.then((res) => res.json())
.then((response: ListTargetsOfEvaluationResponse) => {
.then((response: ListAuditScopesResponse) => {
return response.auditScope;
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(app)/cloud/[id]/compliance/+layout.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { listEvaluationResults } from '$lib/api/evaluation';
import { listTargetsOfEvaluation } from '$lib/api/orchestrator';
import { listAuditScopes } from '$lib/api/orchestrator';
import { error } from '@sveltejs/kit';
import type { LayoutLoad } from './$types';

Expand All @@ -8,7 +8,7 @@ export const load = (async ({ fetch, params, parent }) => {
throw error(405, 'Required parameter missing');
}

const targets = await listTargetsOfEvaluation(params.id, fetch);
const targets = await listAuditScopes(params.id, fetch);
const data = await parent();

const leftOverCatalogs = data.catalogs.filter((c) => {
Expand Down

0 comments on commit d9e751a

Please sign in to comment.