Users can access their items via API. Authentication via API token. No public access to items.

This commit is contained in:
2026-04-22 10:32:42 +02:00
parent 6076654aa4
commit b077a1c81c
7 changed files with 143 additions and 1 deletions

View File

@ -0,0 +1,17 @@
defmodule GenericRestServerWeb.UserTokenJSON do
def token(%{user: user}) do
%{
data: %{
id: user.id,
email: user.email,
token: user.token
}
}
end
def error(%{error: error}) do
%{
error: error
}
end
end