diff options
Diffstat (limited to 'lib/rook_web/channels/token_channel.ex')
| -rw-r--r-- | lib/rook_web/channels/token_channel.ex | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/rook_web/channels/token_channel.ex b/lib/rook_web/channels/token_channel.ex new file mode 100644 index 0000000..72cabb1 --- /dev/null +++ b/lib/rook_web/channels/token_channel.ex @@ -0,0 +1,11 @@ +defmodule RookWeb.TokenChannel do + use Phoenix.Channel + + def join("token", _params, socket) do + {:ok, socket} + end + + def handle_in("get_token", _attrs, socket) do + {:reply, {:ok, %{token: socket.assigns[:token]}}, socket} + end +end |
