You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've downloaded the example and did some tests. But when tried the action Delete at Presence Example I got the error:
[error] GenServer #PID<0.596.0> terminating
** (Ecto.Query.CastError) deps/ecto/lib/ecto/repo/queryable.ex:411: value `%{"altKey" => false, "ctrlKey" => false, "id" => "21", "metaKey" => false, "offsetX" => 108, "offsetY" => 27, "pageX" => 633, "pageY" => 752, "screenX" => 1378, "screenY" => 329, "shiftKey" => false, "x" => 633, "y" => 195}` in `where` cannot be cast to type :id in query:
Seems can't get phx_value_id at templates->user->index.html.leex. And I have changed at below then it worked.
def handle_event("delete_user", id, socket) do
#user = Accounts.get_user!(id)
user = Accounts.get_user!(id["id"])
{:ok, _user} = Accounts.delete_user(user)
{:noreply, socket}
end
Please help to review.
The text was updated successfully, but these errors were encountered:
leductam
changed the title
Can't not get phx_value_id on handle_event("delete_user", id, socket)
Can't get phx_value_id on handle_event("delete_user", id, socket)
Feb 9, 2020
I've downloaded the example and did some tests. But when tried the action Delete at Presence Example I got the error:
Seems can't get phx_value_id at templates->user->index.html.leex. And I have changed at below then it worked.
Please help to review.
The text was updated successfully, but these errors were encountered: