CUCB / CUCB/website

Remove unnecessary `assertLoggedIn` calls

Open
#124 0 comments 0 reactions 0 assignees View on GitHub
enhancement nice to have
Dominant language
TypeScript
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Description

In Sapper (the predecessor to SvelteKit), error handling wasn't terribly deterministic. So if in the [layout load function](https://kit.svelte.dev/docs/load#layout-data) e.g. `src/routes/members/+layout.server.ts` rejected the request with a not logged in error (HTTP 401), and the [page](https://kit.svelte.dev/docs/load#page-data) rejected the request with missing permissions (HTTP 403), it was pot luck as to which of the two errors got sent to the user. It seems like this is now resolved in SvelteKit, so we don't need to call `assertLoggedIn` in every handler for URLs starting with `/members`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.