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
|
||||
%{profile: nil}
|
||||
|
||||
has_one :profile, Friends.Friend
|
||||
end
|
||||
|
||||
@doc """
|
||||
|
||||
@ -23,6 +23,8 @@ defmodule FriendsWeb.Router do
|
||||
get "/", PageController, :index
|
||||
get "/friends", FriendController, :index
|
||||
|
||||
live "/friend/:slug", FriendsLive.Show
|
||||
|
||||
live "/friend/:slug", FriendLive.Show
|
||||
live "/friend/:slug/edit", FriendLive.Edit
|
||||
end
|
||||
|
||||
@ -6,5 +6,7 @@
|
||||
<% else %>
|
||||
<%= 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 "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 %>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user