Call broadcast function from app configured module.
This commit is contained in:
parent
d6e877137f
commit
fc54fa1761
7 changed files with 15 additions and 22 deletions
ui/lib/ui_web/channels
|
@ -30,4 +30,9 @@ defmodule UiWeb.UserSocket do
|
|||
#
|
||||
# Returning `nil` makes this socket anonymous.
|
||||
def id(_socket), do: nil
|
||||
|
||||
def broadcast_progress(progress) do
|
||||
IO.puts("in user socket!")
|
||||
UiWeb.Endpoint.broadcast("morse:progress", "update", %{value: progress})
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue