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

Review router #63

Open
katbow opened this issue Oct 26, 2017 · 0 comments
Open

Review router #63

katbow opened this issue Oct 26, 2017 · 0 comments

Comments

@katbow
Copy link
Contributor

katbow commented Oct 26, 2017

There a few things in the router I think can be tidied up

  • using resources instead of get, post etc. This keeps the routes RESTful and avoids duplication/confusion with things like how we have logout defined. This will also involve some renaming of actions.
  • scopes - there are a few separate scopes that I question the necessity of, eg. login and logout. If there are cases where we will be using different plugs for a scope (i.e. I can see this for the "/admin" scope) then that makes sense as a different scope
  • related to above, using plugs in the scopes as appropriate. The require_admin.ex plug can be used for the admin scope, for example.

Some useful links to refer to:
resources/4
scope/2
Scoped routes

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

No branches or pull requests

1 participant