Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions copi.owasp.org/lib/copi_web/live/game_live/index.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ defmodule CopiWeb.GameLive.Index do
use CopiWeb, :live_view
use Phoenix.Component

alias Copi.Cornucopia
alias Copi.Cornucopia.Game

@impl true
Expand All @@ -28,18 +27,6 @@ defmodule CopiWeb.GameLive.Index do
|> assign(:game, nil)
end

@impl true
def handle_event("delete", %{"id" => id}, socket) do
game = Cornucopia.get_game!(id)
{:ok, _} = Cornucopia.delete_game(game)

{:noreply, assign(socket, :games, list_games())}
end

defp list_games do
Cornucopia.list_games()
end

@impl true
def handle_info({:update_parent, new_state}, socket) do
{:noreply, assign(socket, :games, new_state)}
Expand Down
Loading