Janky initial implementation of auth and profiles

This commit is contained in:
Ryan Pandya 2022-10-29 17:20:14 -07:00
parent 0c2f304b2f
commit eccaca068d
3 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,8 @@ defmodule Friends.Accounts.User do
def load_profile(nil) do
%{profile: nil}
has_one :profile, Friends.Friend
end
@doc """

View File

@ -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

View File

@ -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 %>