Preloaders: Use strings as keys.
This commit is contained in:
parent
a19f8778af
commit
8630a6c7f5
8 changed files with 13 additions and 13 deletions
|
|
@ -8,9 +8,9 @@ defmodule Pleroma.Web.Preload.Providers.Instance do
|
|||
alias Pleroma.Web.Preload.Providers.Provider
|
||||
|
||||
@behaviour Provider
|
||||
@instance_url :"/api/v1/instance"
|
||||
@panel_url :"/instance/panel.html"
|
||||
@nodeinfo_url :"/nodeinfo/2.0.json"
|
||||
@instance_url "/api/v1/instance"
|
||||
@panel_url "/instance/panel.html"
|
||||
@nodeinfo_url "/nodeinfo/2.0.json"
|
||||
|
||||
@impl Provider
|
||||
def generate_terms(_params) do
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ defmodule Pleroma.Web.Preload.Providers.StatusNet do
|
|||
alias Pleroma.Web.TwitterAPI.UtilController
|
||||
|
||||
@behaviour Provider
|
||||
@config_url :"/api/statusnet/config.json"
|
||||
@config_url "/api/statusnet/config.json"
|
||||
|
||||
@impl Provider
|
||||
def generate_terms(_params) do
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ defmodule Pleroma.Web.Preload.Providers.Timelines do
|
|||
alias Pleroma.Web.Preload.Providers.Provider
|
||||
|
||||
@behaviour Provider
|
||||
@public_url :"/api/v1/timelines/public"
|
||||
@public_url "/api/v1/timelines/public"
|
||||
|
||||
@impl Provider
|
||||
def generate_terms(params) do
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ defmodule Pleroma.Web.Preload.Providers.User do
|
|||
alias Pleroma.Web.Preload.Providers.Provider
|
||||
|
||||
@behaviour Provider
|
||||
@account_url_base :"/api/v1/accounts"
|
||||
@account_url_base "/api/v1/accounts"
|
||||
|
||||
@impl Provider
|
||||
def generate_terms(%{user: user}) do
|
||||
|
|
@ -19,7 +19,7 @@ defmodule Pleroma.Web.Preload.Providers.User do
|
|||
|
||||
def build_accounts_tag(acc, %User{} = user) do
|
||||
account_data = AccountView.render("show.json", %{user: user, for: user})
|
||||
Map.put(acc, :"#{@account_url_base}/#{user.id}", account_data)
|
||||
Map.put(acc, "#{@account_url_base}/#{user.id}", account_data)
|
||||
end
|
||||
|
||||
def build_accounts_tag(acc, _), do: acc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue