Use verified routes instead of plain strings

This commit is contained in:
Claudio Ortolina
2024-11-01 15:08:37 +00:00
parent 0ccb165235
commit 9d640d0985
3 changed files with 7 additions and 9 deletions
@@ -92,9 +92,8 @@ defmodule MusicLibraryWeb.RecordLive.Index do
@default_records_list_params
|> Map.put(:query, query)
|> Map.take([:query, :page, :page_size])
|> URI.encode_query()
{:noreply, push_patch(socket, to: ~s"/records?#{qs}")}
{:noreply, push_patch(socket, to: ~p"/records?#{qs}")}
end
def handle_event("import", %{"id" => musicbrainz_id, "format" => format}, socket) do
@@ -94,9 +94,8 @@ defmodule MusicLibraryWeb.WishlistLive.Index do
@default_records_list_params
|> Map.put(:query, query)
|> Map.take([:query, :page, :page_size])
|> URI.encode_query()
{:noreply, push_patch(socket, to: ~s"/wishlist?#{qs}")}
{:noreply, push_patch(socket, to: ~p"/wishlist?#{qs}")}
end
def handle_event("import", %{"id" => musicbrainz_id, "format" => format}, socket) do