We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7875687 commit 753dc47Copy full SHA for 753dc47
1 file changed
copi.owasp.org/lib/copi_web/controllers/api_controller.ex
@@ -25,11 +25,11 @@ defmodule CopiWeb.ApiController do
25
{:ok, dealt_card} ->
26
with {:ok, updated_game} <- Game.find(game.id) do
27
CopiWeb.Endpoint.broadcast(topic(game.id), "game:updated", updated_game)
28
+ conn |> json(%{"id" => dealt_card.id})
29
else
30
{:error, _reason} ->
31
conn |> put_status(:internal_server_error) |> json(%{"error" => "Could not find updated game"})
32
end
- conn |> json(%{"id" => dealt_card.id})
33
{:error, _changeset} ->
34
conn |> put_status(:internal_server_error) |> json(%{"error" => "Could not update dealt card"})
35
0 commit comments