mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-21 15:41:00 +00:00
redirect from signin page is logged in
This commit is contained in:
parent
dbf5cc32f3
commit
a68a9a8d51
1 changed files with 5 additions and 1 deletions
|
@ -32,6 +32,10 @@ defmodule LiveBeatsWeb.SignInLive do
|
|||
end
|
||||
|
||||
def mount(_params, _session, socket) do
|
||||
if user = socket.assigns.current_user do
|
||||
{:ok, redirect(socket, to: profile_path(user))}
|
||||
else
|
||||
{:ok, socket}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue