Skip to content
Snippets Groups Projects
Commit 94708d63 authored by Maxim Filippov's avatar Maxim Filippov :new_moon_with_face:
Browse files

Render only "id", "valid_until" and "app_name" in TokenView

parent 760fec4c
No related branches found
No related tags found
No related merge requests found
......@@ -68,5 +68,6 @@ defmodule Pleroma.Web.OAuth.Token do
where: t.user_id == ^user_id
)
|> Repo.all()
|> Repo.preload(:app)
end
end
......@@ -14,9 +14,8 @@ defmodule Pleroma.Web.TwitterAPI.TokenView do
def render("show.json", %{token: token_entry}) do
%{
id: token_entry.id,
token: token_entry.token,
refresh_token: token_entry.refresh_token,
valid_until: token_entry.valid_until
valid_until: token_entry.valid_until,
app_name: token_entry.app.client_name
}
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment