fix
This commit is contained in:
parent
a614fcba79
commit
b748e8aea0
2 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue