Update wishlisting flash messages

This commit is contained in:
Claudio Ortolina
2025-04-09 11:11:04 +01:00
parent a836782016
commit 211fc4ea78
4 changed files with 23 additions and 15 deletions
@@ -50,7 +50,7 @@ defmodule MusicLibraryWeb.StatsLive.Index do
{:ok, record} ->
{:noreply,
socket
|> put_flash(:info, gettext("Record imported successfully"))
|> put_flash(:info, gettext("Record wishlisted successfully"))
|> push_navigate(to: ~p"/wishlist/#{record.id}")}
{:error, %Ecto.Changeset{} = changeset} ->
@@ -58,13 +58,13 @@ defmodule MusicLibraryWeb.StatsLive.Index do
socket
|> put_flash(
:error,
gettext("Error importing record") <> "," <> inspect(changeset.errors)
gettext("Error wishlisting record") <> "," <> inspect(changeset.errors)
)}
{:error, reason} ->
{:noreply,
socket
|> put_flash(:error, gettext("Error importing record") <> "," <> inspect(reason))}
|> put_flash(:error, gettext("Error wishlisting record") <> "," <> inspect(reason))}
end
end