From ab1a288928a3ea262b13945ea15f15ac84d2696c Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 16 Apr 2023 00:46:49 -0400 Subject: [PATCH] change invite path --- CHANGELOG.md | 1 + lib/cannery_web/live/invite_live/index.html.heex | 2 +- lib/cannery_web/router.ex | 2 +- test/cannery_web/live/invite_live_test.exs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ddd7f7e..17eb2e9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # v0.9.4 - Improve tests +- Change invite path slightly # v0.9.3 - Update dependencies diff --git a/lib/cannery_web/live/invite_live/index.html.heex b/lib/cannery_web/live/invite_live/index.html.heex index 891fd033..1b9bd8f3 100644 --- a/lib/cannery_web/live/invite_live/index.html.heex +++ b/lib/cannery_web/live/invite_live/index.html.heex @@ -40,7 +40,7 @@ <.link - patch={~p"/invites/#{invite}/edit"} + patch={~p"/invites/edit/#{invite}"} class="text-primary-600 link" aria-label={ dgettext("actions", "Edit invite for %{invite_name}", invite_name: invite.name) diff --git a/lib/cannery_web/router.ex b/lib/cannery_web/router.ex index e90c7695..992026c6 100644 --- a/lib/cannery_web/router.ex +++ b/lib/cannery_web/router.ex @@ -112,7 +112,7 @@ defmodule CanneryWeb.Router do live_session :admin, on_mount: [{CanneryWeb.UserAuth, :ensure_admin}] do live "/invites", InviteLive.Index, :index live "/invites/new", InviteLive.Index, :new - live "/invites/:id/edit", InviteLive.Index, :edit + live "/invites/edit/:id", InviteLive.Index, :edit end end diff --git a/test/cannery_web/live/invite_live_test.exs b/test/cannery_web/live/invite_live_test.exs index a156a0b8..da80d085 100644 --- a/test/cannery_web/live/invite_live_test.exs +++ b/test/cannery_web/live/invite_live_test.exs @@ -51,7 +51,7 @@ defmodule CanneryWeb.InviteLiveTest do |> element(~s/a[aria-label="Edit invite for #{invite.name}"]/) |> render_click() =~ "Edit Invite" - assert_patch(index_live, ~p"/invites/#{invite}/edit") + assert_patch(index_live, ~p"/invites/edit/#{invite}") assert index_live |> form("#invite-form")