Skip to content

Commit

Permalink
add fallback when params missing for move event (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikStreek authored Sep 11, 2024
1 parent de8bb13 commit 314e3f8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/mindwendel_web/live/idea_live/index_component.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
defmodule MindwendelWeb.IdeaLive.IndexComponent do
require Logger
use MindwendelWeb, :live_component

alias Mindwendel.Ideas
Expand Down Expand Up @@ -77,6 +78,18 @@ defmodule MindwendelWeb.IdeaLive.IndexComponent do
end
end

def handle_event(
"change_position",
params,
socket
) do
Logger.warning(
"Handle event 'change_position', missing required params in #{inspect(params)}"
)

{:noreply, socket}
end

def handle_event(
"add_idea_label_to_idea",
%{
Expand Down

0 comments on commit 314e3f8

Please sign in to comment.