Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/course_detail_student' into cour…
Browse files Browse the repository at this point in the history
…se_detail_student
  • Loading branch information
warreprovoost committed May 23, 2024
2 parents d611c18 + a7687c1 commit 18e48e6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/src/loaders/submission-overview-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@ export default async function loadSubmissionOverview({
}: {
params: Params<string>;
}) {

const projectId = params.projectId;
const projectResponse = await authenticatedFetch(
`${APIURL}/projects/${projectId}`
);

if (!projectResponse.ok) {
if (projectResponse.status == 403) {
throw new Response("Not authenticated", {status: 403});
} else if (projectResponse.status == 404) {
throw new Response("Not found", {status: 404});
}
}

const projectData = (await projectResponse.json())["data"];

const overviewResponse = await authenticatedFetch(
Expand Down

0 comments on commit 18e48e6

Please sign in to comment.