This commit is contained in:
Henry Jameson 2026-11-05 17:31:33 +02:00
commit b748e8aea0
2 changed files with 4 additions and 2 deletions

View file

@ -30,7 +30,7 @@ defmodule Pleroma.Web.OAuth.TokenController do
with oauth_tokens <- Token.get_user_tokens(user) do
conn
|> put_view(TokenView)
|> render("index.json", %{tokens: oauth_tokens, token: current_token})
|> render("index.json", %{tokens: oauth_tokens, current_token: current_token})
end
end

View file

@ -7,7 +7,9 @@ defmodule Pleroma.Web.OAuth.TokenView do
def render("index.json", %{tokens: tokens, current_token: current_token}) do
tokens
|> render_many(Pleroma.Web.OAuth.TokenView, "show.json")
|> render_many(Pleroma.Web.OAuth.TokenView, "show.json", %{
current_token: current_token
})
|> Enum.filter(&Enum.any?/1)
end