always assign current_user to socket

This commit is contained in:
shibao 2022-11-17 22:32:37 -05:00
parent cbee15b70f
commit 0aa7df0b37

View File

@ -15,5 +15,6 @@ defmodule MemexWeb.InitAssigns do
{:cont, socket}
end
def on_mount(:default, _params, _session, socket), do: {:cont, socket}
def on_mount(:default, _params, _session, socket),
do: {:cont, socket |> assign_new(:current_user, fn -> nil end)}
end