add status_net/config
This commit is contained in:
parent
dbcc1b105e
commit
3b8180d7d1
6 changed files with 63 additions and 15 deletions
24
lib/pleroma/web/preload/status_net.ex
Normal file
24
lib/pleroma/web/preload/status_net.ex
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Pleroma: A lightweight social networking server
|
||||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.Web.Preload.Providers.StatusNet do
|
||||
alias Pleroma.Web.TwitterAPI.UtilView
|
||||
alias Pleroma.Web.Preload.Providers.Provider
|
||||
|
||||
@behaviour Provider
|
||||
@config_url :"/api/statusnet/config.json"
|
||||
|
||||
@impl Provider
|
||||
def generate_terms(_params) do
|
||||
%{}
|
||||
|> build_config_tag()
|
||||
end
|
||||
|
||||
defp build_config_tag(acc) do
|
||||
instance = Pleroma.Config.get(:instance)
|
||||
info_data = UtilView.status_net_config(instance)
|
||||
|
||||
Map.put(acc, @config_url, info_data)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue