forked from mirrors/akkoma
Render only "id", "valid_until" and "app_name" in TokenView
This commit is contained in:
parent
760fec4cb8
commit
94708d6370
|
@ -68,5 +68,6 @@ def get_user_tokens(%User{id: user_id}) do
|
||||||
where: t.user_id == ^user_id
|
where: t.user_id == ^user_id
|
||||||
)
|
)
|
||||||
|> Repo.all()
|
|> Repo.all()
|
||||||
|
|> Repo.preload(:app)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,9 +14,8 @@ def render("index.json", %{tokens: tokens}) do
|
||||||
def render("show.json", %{token: token_entry}) do
|
def render("show.json", %{token: token_entry}) do
|
||||||
%{
|
%{
|
||||||
id: token_entry.id,
|
id: token_entry.id,
|
||||||
token: token_entry.token,
|
valid_until: token_entry.valid_until,
|
||||||
refresh_token: token_entry.refresh_token,
|
app_name: token_entry.app.client_name
|
||||||
valid_until: token_entry.valid_until
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue