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

Redundant redirect in controllers/index.js #22

Open
bobbysebolao opened this issue Aug 23, 2019 · 0 comments
Open

Redundant redirect in controllers/index.js #22

bobbysebolao opened this issue Aug 23, 2019 · 0 comments

Comments

@bobbysebolao
Copy link

On lines 12-14 of this file you’re handling the endpoints for when a user searches for a quote category. I could be mistaken, but isn’t line 17 doing pretty much the same thing, minus the redirect?

In your script.js file (public/js/script.js), instead of making the fetch request to "/quotes/searchcategory/${category}", perhaps you could make it to "/quotes/category/:category” and eliminate the redirect?

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