Evaluate redundant redirects between client and server #2992
Labels
Area:Backend
For server-side logic, APIs, or database functionality
Area: Code Quality
For refactoring, cleanup, or improvements to maintainability
Priority:High
Should be addressed soon but not critical
Milestone
Increasing Access
It is confusing to work with code where redirections can be be initiated from multiple places.
Feature enhancement details
Ref: #2987 (comment)
We should look through the https://github.com/processing/p5.js-web-editor/blob/develop/client/routes.jsx file and see which redirects are not actually needed because they are already handled by the server in https://github.com/processing/p5.js-web-editor/blob/develop/server/routes/server.routes.js.
Specifically, we should check over our usages of
userIsNotAuthenticated
,userIsAuthenticated
,userIsAuthorized
, andcreateRedirectWithUsername
. I have a hunch that we can actually delete all four of those functions. Let's make a list of all routes which use some form of redirection and whether each route's redirect logic duplicates what is already implemented on the server.The text was updated successfully, but these errors were encountered: