diff --git a/lib/cannery_web/components/move_ammo_group_component.html.heex b/lib/cannery_web/components/move_ammo_group_component.html.heex
index ae5db79..274096c 100644
--- a/lib/cannery_web/components/move_ammo_group_component.html.heex
+++ b/lib/cannery_web/components/move_ammo_group_component.html.heex
@@ -10,7 +10,7 @@
<%= live_patch(dgettext("actions", "Add another container!"),
- to: Routes.container_index_path(@socket, :new),
+ to: Routes.container_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
<% else %>
diff --git a/lib/cannery_web/live/ammo_group_live/index.html.heex b/lib/cannery_web/live/ammo_group_live/index.html.heex
index 55977bc..3377f6c 100644
--- a/lib/cannery_web/live/ammo_group_live/index.html.heex
+++ b/lib/cannery_web/live/ammo_group_live/index.html.heex
@@ -10,12 +10,12 @@
<%= live_patch(dgettext("actions", "Add your first box!"),
- to: Routes.ammo_group_index_path(@socket, :new),
+ to: Routes.ammo_group_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
<% else %>
<%= live_patch(dgettext("actions", "New Ammo group"),
- to: Routes.ammo_group_index_path(@socket, :new),
+ to: Routes.ammo_group_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
@@ -92,7 +92,7 @@
<%= if ammo_group.container do %>
<%= live_patch(ammo_group.container.name,
- to: Routes.ammo_group_index_path(@socket, :move, ammo_group),
+ to: Routes.ammo_group_index_path(Endpoint, :move, ammo_group),
class: "btn btn-primary"
) %>
<% end %>
@@ -100,13 +100,13 @@
|
- <%= live_redirect to: Routes.ammo_group_show_path(@socket, :show, ammo_group),
+ <%= live_redirect to: Routes.ammo_group_show_path(Endpoint, :show, ammo_group),
class: "text-primary-600 link",
data: [qa: "view-#{ammo_group.id}"] do %>
<% end %>
- <%= live_patch to: Routes.ammo_group_index_path(@socket, :edit, ammo_group),
+ <%= live_patch to: Routes.ammo_group_index_path(Endpoint, :edit, ammo_group),
class: "text-primary-600 link",
data: [qa: "edit-#{ammo_group.id}"] do %>
diff --git a/lib/cannery_web/live/ammo_type_live/index.html.heex b/lib/cannery_web/live/ammo_type_live/index.html.heex
index 44db4f5..bd74877 100644
--- a/lib/cannery_web/live/ammo_type_live/index.html.heex
+++ b/lib/cannery_web/live/ammo_type_live/index.html.heex
@@ -10,12 +10,12 @@
<%= live_patch(dgettext("actions", "Add your first type!"),
- to: Routes.ammo_type_index_path(@socket, :new),
+ to: Routes.ammo_type_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
<% else %>
<%= live_patch(dgettext("actions", "New Ammo type"),
- to: Routes.ammo_type_index_path(@socket, :new),
+ to: Routes.ammo_type_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
@@ -48,13 +48,13 @@
- <%= live_redirect to: Routes.ammo_type_show_path(@socket, :show, ammo_type),
+ <%= live_redirect to: Routes.ammo_type_show_path(Endpoint, :show, ammo_type),
class: "text-primary-600 link",
data: [qa: "view-#{ammo_type.id}"] do %>
<% end %>
- <%= live_patch to: Routes.ammo_type_index_path(@socket, :edit, ammo_type),
+ <%= live_patch to: Routes.ammo_type_index_path(Endpoint, :edit, ammo_type),
class: "text-primary-600 link",
data: [qa: "edit-#{ammo_type.id}"] do %>
diff --git a/lib/cannery_web/live/ammo_type_live/show.html.heex b/lib/cannery_web/live/ammo_type_live/show.html.heex
index a54b911..d86d8d1 100644
--- a/lib/cannery_web/live/ammo_type_live/show.html.heex
+++ b/lib/cannery_web/live/ammo_type_live/show.html.heex
@@ -15,7 +15,7 @@
<% end %>
- <%= live_patch to: Routes.ammo_type_show_path(@socket, :edit, @ammo_type),
+ <%= live_patch to: Routes.ammo_type_show_path(Endpoint, :edit, @ammo_type),
class: "text-primary-600 link",
data: [qa: "edit"] do %>
diff --git a/lib/cannery_web/live/container_live/index.ex b/lib/cannery_web/live/container_live/index.ex
index 485739e..2521ca2 100644
--- a/lib/cannery_web/live/container_live/index.ex
+++ b/lib/cannery_web/live/container_live/index.ex
@@ -6,6 +6,7 @@ defmodule CanneryWeb.ContainerLive.Index do
use CanneryWeb, :live_view
import CanneryWeb.Components.ContainerCard
alias Cannery.{Containers, Containers.Container}
+ alias CanneryWeb.Endpoint
alias Ecto.Changeset
@impl true
diff --git a/lib/cannery_web/live/container_live/index.html.heex b/lib/cannery_web/live/container_live/index.html.heex
index 3bd649d..8ecb455 100644
--- a/lib/cannery_web/live/container_live/index.html.heex
+++ b/lib/cannery_web/live/container_live/index.html.heex
@@ -10,12 +10,12 @@
<%= live_patch(dgettext("actions", "Add your first container!"),
- to: Routes.container_index_path(@socket, :new),
+ to: Routes.container_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
<% else %>
<%= live_patch(dgettext("actions", "New Container"),
- to: Routes.container_index_path(@socket, :new),
+ to: Routes.container_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
<% end %>
@@ -23,7 +23,7 @@
<%= for container <- @containers do %>
<.container_card container={container}>
- <%= live_patch to: Routes.container_index_path(@socket, :edit, container),
+ <%= live_patch to: Routes.container_index_path(Endpoint, :edit, container),
class: "text-primary-600 link",
data: [qa: "edit-#{container.id}"] do %>
@@ -46,14 +46,14 @@
<%= if @live_action in [:new, :edit] do %>
- <.modal return_to={Routes.container_index_path(@socket, :index)}>
+ <.modal return_to={Routes.container_index_path(Endpoint, :index)}>
<.live_component
module={CanneryWeb.ContainerLive.FormComponent}
id={@container.id || :new}
title={@page_title}
action={@live_action}
container={@container}
- return_to={Routes.container_index_path(@socket, :index)}
+ return_to={Routes.container_index_path(Endpoint, :index)}
current_user={@current_user}
/>
diff --git a/lib/cannery_web/live/container_live/show.html.heex b/lib/cannery_web/live/container_live/show.html.heex
index a8c847c..450d22f 100644
--- a/lib/cannery_web/live/container_live/show.html.heex
+++ b/lib/cannery_web/live/container_live/show.html.heex
@@ -23,7 +23,7 @@
<% end %>
- <%= live_patch to: Routes.container_show_path(@socket, :edit, @container),
+ <%= live_patch to: Routes.container_show_path(Endpoint, :edit, @container),
class: "text-primary-600 link",
data: [qa: "edit"] do %>
diff --git a/lib/cannery_web/live/invite_live/index.html.heex b/lib/cannery_web/live/invite_live/index.html.heex
index da15124..c88eadb 100644
--- a/lib/cannery_web/live/invite_live/index.html.heex
+++ b/lib/cannery_web/live/invite_live/index.html.heex
@@ -10,12 +10,12 @@
<%= live_patch(dgettext("actions", "Invite someone new!"),
- to: Routes.invite_index_path(@socket, :new),
+ to: Routes.invite_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
<% else %>
<%= live_patch(dgettext("actions", "Create Invite"),
- to: Routes.invite_index_path(@socket, :new),
+ to: Routes.invite_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
<% end %>
@@ -144,14 +144,14 @@
<%= if @live_action in [:new, :edit] do %>
- <.modal return_to={Routes.invite_index_path(@socket, :index)}>
+ <.modal return_to={Routes.invite_index_path(Endpoint, :index)}>
<.live_component
module={CanneryWeb.InviteLive.FormComponent}
id={@invite.id || :new}
title={@page_title}
action={@live_action}
invite={@invite}
- return_to={Routes.invite_index_path(@socket, :index)}
+ return_to={Routes.invite_index_path(Endpoint, :index)}
current_user={@current_user}
/>
diff --git a/lib/cannery_web/live/live_helpers.ex b/lib/cannery_web/live/live_helpers.ex
index 1df5f04..c58ad61 100644
--- a/lib/cannery_web/live/live_helpers.ex
+++ b/lib/cannery_web/live/live_helpers.ex
@@ -25,13 +25,13 @@ defmodule CanneryWeb.LiveHelpers do
## Examples
- <.modal return_to={Routes.<%= schema.singular %>_index_path(@socket, :index)}>
+ <.modal return_to={Routes.<%= schema.singular %>_index_path(Endpoint, :index)}>
<.live_component
module={<%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.FormComponent}
id={@<%= schema.singular %>.id || :new}
title={@page_title}
action={@live_action}
- return_to={Routes.<%= schema.singular %>_index_path(@socket, :index)}
+ return_to={Routes.<%= schema.singular %>_index_path(Endpoint, :index)}
<%= schema.singular %>: @<%= schema.singular %>
/>
diff --git a/lib/cannery_web/live/tag_live/index.html.heex b/lib/cannery_web/live/tag_live/index.html.heex
index 3587601..e67162a 100644
--- a/lib/cannery_web/live/tag_live/index.html.heex
+++ b/lib/cannery_web/live/tag_live/index.html.heex
@@ -12,12 +12,12 @@
<%= live_patch(dgettext("actions", "Make your first tag!"),
- to: Routes.tag_index_path(@socket, :new),
+ to: Routes.tag_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
<% else %>
<%= live_patch(dgettext("actions", "New Tag"),
- to: Routes.tag_index_path(@socket, :new),
+ to: Routes.tag_index_path(Endpoint, :new),
class: "btn btn-primary"
) %>
<% end %>
@@ -46,14 +46,14 @@
<%= if @live_action in [:new, :edit] do %>
- <.modal return_to={Routes.tag_index_path(@socket, :index)}>
+ <.modal return_to={Routes.tag_index_path(Endpoint, :index)}>
<.live_component
module={CanneryWeb.TagLive.FormComponent}
id={@tag.id || :new}
title={@page_title}
action={@live_action}
tag={@tag}
- return_to={Routes.tag_index_path(@socket, :index)}
+ return_to={Routes.tag_index_path(Endpoint, :index)}
current_user={@current_user}
/>
| |