feat(chat): simplify socket response

Add helper methods to create the tuples `{:ok, socket}` and
`{:noreply, socket}`, and make them available in `SlaxWeb` module.
This commit is contained in:
2025-02-05 00:05:49 +00:00
parent 2063870a9e
commit 489be57db7
5 changed files with 72 additions and 64 deletions

View File

@@ -0,0 +1,9 @@
defmodule SlaxWeb.SocketHelpers do
@moduledoc """
Helper functions to encapsulate a socket into proper tuples.
"""
def ok(socket), do: {:ok, socket}
def noreply(socket), do: {:noreply, socket}
end