|
|
|
@ -30,7 +30,6 @@ defmodule DecentralisedBookIndexWeb.PublisherLive.Edit do
|
|
|
|
|
socket
|
|
|
|
|
|> assign(:params, params)
|
|
|
|
|
|> apply_action(socket.assigns.live_action, params)
|
|
|
|
|
|> redirect_if_not_editable()
|
|
|
|
|
|
|
|
|
|
{:noreply, socket}
|
|
|
|
|
end
|
|
|
|
@ -42,6 +41,7 @@ defmodule DecentralisedBookIndexWeb.PublisherLive.Edit do
|
|
|
|
|
:publisher,
|
|
|
|
|
Ash.get!(Metadata.Publisher, id, load: [:dbi_server], actor: socket.assigns.current_user)
|
|
|
|
|
)
|
|
|
|
|
|> redirect_if_not_editable()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
defp apply_action(socket, :new, _params) do
|
|
|
|
|