change invite path
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
shibao 2023-04-16 00:46:49 -04:00
parent e6ef0a8c68
commit ab1a288928
4 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# v0.9.4
- Improve tests
- Change invite path slightly
# v0.9.3
- Update dependencies

View File

@ -40,7 +40,7 @@
</form>
</:code_actions>
<.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)

View File

@ -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

View File

@ -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")