Skip to content

Commit

Permalink
Add results as PageData
Browse files Browse the repository at this point in the history
  • Loading branch information
70mm1 committed Aug 7, 2023
1 parent 9c895d2 commit e635b34
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/routes/(app)/cloud/[id]/resources/+page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { listCloudServiceAssessmentResults } from '$lib/api/orchestrator';

import { error } from '@sveltejs/kit';

import type { PageLoad } from './$types';

export const load = (async ({ fetch, params, url }) => {
if (params.id == undefined) {
throw error(405, 'Required parameter missing');
}

const results = await listCloudServiceAssessmentResults(params.id, fetch);

return {
results
};
}) satisfies PageLoad;

0 comments on commit e635b34

Please sign in to comment.