logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

list_view.ex (506B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Web.MastodonAPI.ListView do
  5. use Pleroma.Web, :view
  6. alias Pleroma.Web.MastodonAPI.ListView
  7. def render("index.json", %{lists: lists} = opts) do
  8. render_many(lists, ListView, "show.json", opts)
  9. end
  10. def render("show.json", %{list: list}) do
  11. %{
  12. id: to_string(list.id),
  13. title: list.title
  14. }
  15. end
  16. end