Remove unused handle_event clause

This commit is contained in:
Claudio Ortolina
2024-11-27 11:13:04 +00:00
parent ccff972aa0
commit 135d1c2fbd
2 changed files with 0 additions and 29 deletions
@@ -48,32 +48,6 @@ defmodule MusicLibraryWeb.StatsLive.Index do
)}
end
def handle_event("import", %{"id" => musicbrainz_id, "format" => format}, socket) do
case Records.import_from_musicbrainz_release(musicbrainz_id,
format: format,
purchased_at: nil
) do
{:ok, record} ->
{:noreply,
socket
|> put_flash(:info, gettext("Record imported successfully"))
|> push_navigate(to: ~p"/wishlist/#{record.id}")}
{:error, %Ecto.Changeset{} = changeset} ->
{:noreply,
socket
|> put_flash(
:error,
gettext("Error importing record") <> "," <> inspect(changeset.errors)
)}
{:error, reason} ->
{:noreply,
socket
|> put_flash(:error, gettext("Error importing record") <> "," <> inspect(reason))}
end
end
def handle_event("refresh_lastfm_feed", _, socket) do
LastFm.Refresh.refresh()
{:noreply, socket}