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

getUserProjects(id) is a mess #203

Open
cubap opened this issue May 23, 2023 · 0 comments
Open

getUserProjects(id) is a mess #203

cubap opened this issue May 23, 2023 · 0 comments

Comments

@cubap
Copy link
Member

cubap commented May 23, 2023

This is called on page load as getUserProjects(007) with a hard-coded octal as an argument.

The definition is let getUserProjects = async function (lookupID) { but lookupID is never used.

let projectName = ""; is set and then never heard from again.

return projectList = await fetch(url, { seems to assign the fetch to an unused variable just to force the await before the return. Also, the url variable is always and just the String "projects" so it might not be important to pull out.

4 way elif could probably be a switch.

Errors are caught but not reported to the UI unless they are successful errors with 40x codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant