1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.TwitterAPI.TokenView do
8 def render("index.json", %{tokens: tokens}) do
10 |> render_many(Pleroma.Web.TwitterAPI.TokenView, "show.json")
11 |> Enum.filter(&Enum.any?/1)
14 def render("show.json", %{token: token_entry}) do
17 valid_until: token_entry.valid_until,
18 app_name: token_entry.app.client_name