1a1b7430bc667991ca080f8b7e5d4eafefa6039f
[akkoma] / lib / pleroma / web / mastodon_api / views / list_view.ex
1 defmodule Pleroma.Web.MastodonAPI.ListView do
2 use Pleroma.Web, :view
3 alias Pleroma.Web.MastodonAPI.ListView
4
5 def render("lists.json", %{lists: lists} = opts) do
6 render_many(lists, ListView, "list.json", opts)
7 end
8
9 def render("list.json", %{list: list}) do
10 %{
11 id: to_string(list.id),
12 title: list.title
13 }
14 end
15 end