Change routes from "/records/*" to "/collection/*"

This commit is contained in:
Claudio Ortolina
2024-11-20 15:39:40 +00:00
parent b8f3bb9b2c
commit 5b3aab51ed
11 changed files with 56 additions and 52 deletions
@@ -9,9 +9,9 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
if connected?(socket) do
socket
|> get_connect_params()
|> Map.get("_live_referer", ~p"/records")
|> Map.get("_live_referer", ~p"/collection")
else
~p"/records"
~p"/collection"
end
socket =
@@ -40,7 +40,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
record = Records.get_record!(id)
{:ok, _} = Records.delete_record(record)
{:noreply, push_navigate(socket, to: ~p"/records")}
{:noreply, push_navigate(socket, to: ~p"/collection")}
end
def handle_event("refresh_musicbrainz_data", %{"id" => id}, socket) do