mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-21 23:50:59 +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
|
end
|
||||||
|
|
||||||
def mount(_params, _session, socket) do
|
def mount(_params, _session, socket) do
|
||||||
|
if user = socket.assigns.current_user do
|
||||||
|
{:ok, redirect(socket, to: profile_path(user))}
|
||||||
|
else
|
||||||
{:ok, socket}
|
{:ok, socket}
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue