aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/preload/instance.ex
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-07-06 12:07:56 +0200
committerlain <lain@soykaf.club>2020-07-06 12:07:56 +0200
commited4f9f6a29d8cf2dd31e41bae7e63aaa15bc9548 (patch)
tree82c5e8b4a40495485533b9c95668cef39ce909d2 /lib/pleroma/web/preload/instance.ex
parenta5bbfa21a1fabe97bfff1cc80348d2944319f3ad (diff)
parent69f0b286f7b3e0518ac7ae54dfb06539dc179698 (diff)
downloadpleroma-ed4f9f6a29d8cf2dd31e41bae7e63aaa15bc9548.tar.gz
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into 1507-static-fe-prioritize-json
Diffstat (limited to 'lib/pleroma/web/preload/instance.ex')
-rw-r--r--lib/pleroma/web/preload/instance.ex9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/pleroma/web/preload/instance.ex b/lib/pleroma/web/preload/instance.ex
index 0b6fd3313..50d1f3382 100644
--- a/lib/pleroma/web/preload/instance.ex
+++ b/lib/pleroma/web/preload/instance.ex
@@ -3,14 +3,15 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Preload.Providers.Instance do
+ alias Pleroma.Plugs.InstanceStatic
alias Pleroma.Web.MastodonAPI.InstanceView
alias Pleroma.Web.Nodeinfo.Nodeinfo
alias Pleroma.Web.Preload.Providers.Provider
@behaviour Provider
- @instance_url :"/api/v1/instance"
- @panel_url :"/instance/panel.html"
- @nodeinfo_url :"/nodeinfo/2.0"
+ @instance_url "/api/v1/instance"
+ @panel_url "/instance/panel.html"
+ @nodeinfo_url "/nodeinfo/2.0.json"
@impl Provider
def generate_terms(_params) do
@@ -27,7 +28,7 @@ defmodule Pleroma.Web.Preload.Providers.Instance do
end
defp build_panel_tag(acc) do
- instance_path = Path.join(:code.priv_dir(:pleroma), "static/instance/panel.html")
+ instance_path = InstanceStatic.file_path(@panel_url |> to_string())
if File.exists?(instance_path) do
panel_data = File.read!(instance_path)