When adding a user via API creating a session token and sending it with the response.

This commit is contained in:
2026-02-18 10:56:16 +01:00
parent 6c41f69723
commit e0b244bd4e
3 changed files with 22 additions and 2 deletions

View File

@ -8,6 +8,13 @@ defmodule BeetRoundServerWeb.UserJSON do
%{data: for(user <- users, do: data(user))}
end
@doc """
Renders a single user with token.
"""
def show(%{user: user, token: encoded_token}) do
%{data: %{email: user.email, id: user.id, token: encoded_token}}
end
@doc """
Renders a single user.
"""