feat(user): display list and fix changeset

This commit is contained in:
Anhgelus Morhtuuzh 2025-08-12 20:27:23 +02:00
parent f1c1ca6d14
commit fbb65e77c0
Signed by: anhgelus
GPG key ID: 617773CACE89052C
3 changed files with 16 additions and 11 deletions

View file

@ -1,8 +1,11 @@
defmodule LearningPhoenixWeb.UserController do
use LearningPhoenixWeb, :controller
alias LearningPhoenix.{Repo, User}
def index(conn, _params) do
render(conn, :index)
conn
|> assign(:test, Repo.all(User))
|> render(:index)
end
def edit(conn, _params) do

View file

@ -6,4 +6,13 @@
<p class="text-xl">
Cette page contient la liste de tous les utilisateurs
</p>
<div class="flex flex-col gap-4 justify-center justify-items-center">
<%= for user <- @test do %>
<div class="flex flex-col gap-2">
<p>Hello {user.name}!</p>
<p>Your email is {user.email}</p>
<p>And your hashed password is {user.password}.</p>
</div>
<% end %>
</div>
</div>