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
+5 -5
View File
@@ -81,8 +81,8 @@ msgstr ""
msgid "Edit"
msgstr ""
#: lib/music_library_web/live/record_live/index.ex:119
#: lib/music_library_web/live/wishlist_live/index.ex:116
#: lib/music_library_web/live/record_live/index.ex:118
#: lib/music_library_web/live/wishlist_live/index.ex:115
#, elixir-autogen, elixir-format
msgid "Error importing record"
msgstr ""
@@ -206,14 +206,14 @@ msgstr ""
msgid "Purchased on"
msgstr ""
#: lib/music_library_web/live/record_live/index.ex:110
#: lib/music_library_web/live/wishlist_live/index.ex:107
#: lib/music_library_web/live/record_live/index.ex:109
#: lib/music_library_web/live/wishlist_live/index.ex:106
#, elixir-autogen, elixir-format
msgid "Record imported successfully"
msgstr ""
#: lib/music_library_web/live/record_live/form_component.ex:117
#: lib/music_library_web/live/wishlist_live/index.ex:129
#: lib/music_library_web/live/wishlist_live/index.ex:128
#, elixir-autogen, elixir-format
msgid "Record updated successfully"
msgstr ""