Janky initial implementation of auth and profiles
This commit is contained in:
parent
0c2f304b2f
commit
eccaca068d
@ -22,6 +22,8 @@ defmodule Friends.Accounts.User do
|
|||||||
|
|
||||||
def load_profile(nil) do
|
def load_profile(nil) do
|
||||||
%{profile: nil}
|
%{profile: nil}
|
||||||
|
|
||||||
|
has_one :profile, Friends.Friend
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
|
|||||||
@ -23,6 +23,8 @@ defmodule FriendsWeb.Router do
|
|||||||
get "/", PageController, :index
|
get "/", PageController, :index
|
||||||
get "/friends", FriendController, :index
|
get "/friends", FriendController, :index
|
||||||
|
|
||||||
|
live "/friend/:slug", FriendsLive.Show
|
||||||
|
|
||||||
live "/friend/:slug", FriendLive.Show
|
live "/friend/:slug", FriendLive.Show
|
||||||
live "/friend/:slug/edit", FriendLive.Edit
|
live "/friend/:slug/edit", FriendLive.Edit
|
||||||
end
|
end
|
||||||
|
|||||||
@ -6,5 +6,7 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<%= link "Log in", to: Routes.user_session_path(@conn, :new), class: "btn" %>
|
<%= link "Log in", to: Routes.user_session_path(@conn, :new), class: "btn" %>
|
||||||
<%= link "Register", to: Routes.user_registration_path(@conn, :new), class: "btn btn-primary" %>
|
<%= link "Register", to: Routes.user_registration_path(@conn, :new), class: "btn btn-primary" %>
|
||||||
|
<%= link "Log in", to: Routes.user_session_path(@conn, :new), class: "btn" %>
|
||||||
|
<%= link "Register", to: Routes.user_registration_path(@conn, :new), class: "btn btn-primary" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user