Review router
- Dominant language
- Elixir
- Stars
- 16
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
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`](https://hexdocs.pm/phoenix/Phoenix.Router.html#resources/4)
[`scope/2`](https://hexdocs.pm/phoenix/Phoenix.Router.html#scope/2)
[Scoped routes](https://hexdocs.pm/phoenix/routing.html#scoped-routes)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.