From 51298ea998bff64b521fe0a392ad340271d40f07 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Wed, 13 Apr 2022 14:17:28 -0600 Subject: Add room id to routes and fix authorization on said routes --- lib/aggiedit_web/live/post_live/show.html.heex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/aggiedit_web/live/post_live/show.html.heex') diff --git a/lib/aggiedit_web/live/post_live/show.html.heex b/lib/aggiedit_web/live/post_live/show.html.heex index fd57bbb..ba71c75 100644 --- a/lib/aggiedit_web/live/post_live/show.html.heex +++ b/lib/aggiedit_web/live/post_live/show.html.heex @@ -1,7 +1,7 @@

Show Post

<%= if @live_action in [:edit] do %> - <.modal return_to={Routes.post_show_path(@socket, :show, @post)}> + <.modal return_to={Routes.post_show_path(@socket, :show, @room, @post)}> <.live_component module={AggieditWeb.PostLive.FormComponent} id={@post.id} @@ -9,7 +9,7 @@ title={@page_title} action={@live_action} post={@post} - return_to={Routes.post_show_path(@socket, :show, @post)} + return_to={Routes.post_show_path(@socket, :show, @room, @post)} /> <% end %> @@ -28,5 +28,5 @@ -<%= live_patch "Edit", to: Routes.post_show_path(@socket, :edit, @post), class: "button" %> | -<%= live_redirect "Back", to: Routes.post_index_path(@socket, :index) %> +<%= live_patch "Edit", to: Routes.post_show_path(@socket, :edit, @room, @post), class: "button" %> | +<%= live_redirect "Back", to: Routes.post_index_path(@socket, :index, @room) %> -- cgit v1.2.3-70-g09d2