Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added 403 for overview page #414

Merged
merged 4 commits into from
May 23, 2024
Merged
Changes from 3 commits
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
12 changes: 11 additions & 1 deletion frontend/src/loaders/submission-overview-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@
}: {
params: Params<string>;
}) {

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

Check failure on line 33 in frontend/src/loaders/submission-overview-loader.ts

View workflow job for this annotation

GitHub Actions / Frontend-tests

Expected indentation of 4 spaces but found 6
);

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
Loading