diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-13 14:17:28 -0600 |
---|---|---|
committer | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-13 14:17:28 -0600 |
commit | 51298ea998bff64b521fe0a392ad340271d40f07 (patch) | |
tree | 32459310f5f5f1466b601a96e5deb76caf1bd1f0 /lib/aggiedit_web/router.ex | |
parent | 77d572796ca940e3eb5edd1192f8cd127286284e (diff) | |
download | aggiedit-51298ea998bff64b521fe0a392ad340271d40f07.tar.gz aggiedit-51298ea998bff64b521fe0a392ad340271d40f07.zip |
Add room id to routes and fix authorization on said routes
Diffstat (limited to 'lib/aggiedit_web/router.ex')
-rw-r--r-- | lib/aggiedit_web/router.ex | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/aggiedit_web/router.ex b/lib/aggiedit_web/router.ex index 1ac0a0f..5036a3d 100644 --- a/lib/aggiedit_web/router.ex +++ b/lib/aggiedit_web/router.ex @@ -25,12 +25,12 @@ defmodule AggieditWeb.Router do scope "/", AggieditWeb do pipe_through [:browser, :require_authenticated_user] - live "/posts/room/:id", PostLive.Index, :index - live "/posts/new", PostLive.Index, :new - live "/posts/:id/edit", PostLive.Index, :edit + live "/room/:room_id", PostLive.Index, :index + live "/room/:room_id/posts/new", PostLive.Index, :new + live "/room/:room_id/posts/:id/edit", PostLive.Index, :edit - live "/posts/:id", PostLive.Show, :show - live "/posts/:id/show/edit", PostLive.Show, :edit + live "/room/:room_id/posts/:id", PostLive.Show, :show + live "/room/:room_id/posts/:id/show/edit", PostLive.Show, :edit end # Other scopes may use custom stacks. |