add models, context and liveviews
This commit is contained in:
@ -45,7 +45,7 @@ let socket = new Socket("/socket", {params: {token: window.userToken}})
|
||||
// # max_age: 1209600 is equivalent to two weeks in seconds
|
||||
// case Phoenix.Token.verify(socket, "user socket", token, max_age: 1209600) do
|
||||
// {:ok, user_id} ->
|
||||
// {:ok, assign(socket, :user, user_id)}
|
||||
// {:ok, socket |> assign(:user, user_id)}
|
||||
// {:error, reason} ->
|
||||
// :error
|
||||
// end
|
||||
|
Reference in New Issue
Block a user