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

added 403 for overview page #414

Merged
merged 4 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 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,16 @@ export default async function loadSubmissionOverview({
}: {
params: Params<string>;
}) {

Gerwoud marked this conversation as resolved.
Show resolved Hide resolved
const projectId = params.projectId;
const projectResponse = await authenticatedFetch(
`${APIURL}/projects/${projectId}`
);

if(projectResponse.status != 200) {
AronBuzogany marked this conversation as resolved.
Show resolved Hide resolved
throw new Response("Not authenticated", {status: 403});
Gerwoud marked this conversation as resolved.
Show resolved Hide resolved
}

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

const overviewResponse = await authenticatedFetch(
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/pages/error/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@
message={t("serverErrorMessage")}
/>
);
} else {
return (
<ErrorPage

Check failure on line 69 in frontend/src/pages/error/ErrorBoundary.tsx

View workflow job for this annotation

GitHub Actions / Frontend-tests

Expected indentation of 8 spaces but found 10
statusCode={error.statusText}

Check failure on line 70 in frontend/src/pages/error/ErrorBoundary.tsx

View workflow job for this annotation

GitHub Actions / Frontend-tests

Expected indentation of 10 spaces but found 14
statusTitle={t("serverError")}

Check failure on line 71 in frontend/src/pages/error/ErrorBoundary.tsx

View workflow job for this annotation

GitHub Actions / Frontend-tests

Expected indentation of 10 spaces but found 14
message={t("serverErrorMessage")}

Check failure on line 72 in frontend/src/pages/error/ErrorBoundary.tsx

View workflow job for this annotation

GitHub Actions / Frontend-tests

Expected indentation of 10 spaces but found 14
/>

Check failure on line 73 in frontend/src/pages/error/ErrorBoundary.tsx

View workflow job for this annotation

GitHub Actions / Frontend-tests

Expected indentation of 8 spaces but found 10
);
}
}
};
1 change: 1 addition & 0 deletions frontend/src/pages/project/projectView/ProjectView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@

}, [projectId, updateProject]);


Check failure on line 159 in frontend/src/pages/project/projectView/ProjectView.tsx

View workflow job for this annotation

GitHub Actions / Frontend-tests

More than 1 blank line not allowed
if (!projectId) return null;

return (
Expand Down
Loading