move to 2.5.5
[anni] / lib / pleroma / web / admin_api / views / frontend_view.ex
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
5 defmodule Pleroma.Web.AdminAPI.FrontendView do
6   use Pleroma.Web, :view
7
8   def render("index.json", %{frontends: frontends}) do
9     render_many(frontends, __MODULE__, "show.json")
10   end
11
12   def render("show.json", %{frontend: frontend}) do
13     %{
14       name: frontend["name"],
15       git: frontend["git"],
16       build_url: frontend["build_url"],
17       ref: frontend["ref"],
18       installed: frontend["installed"]
19     }
20   end
21 end