plug(
OAuthScopesPlug,
%{scopes: ["read"], admin: true}
- when action in [:config_show, :migrate_to_db, :migrate_from_db, :list_log]
+ when action in [:config_show, :migrate_from_db, :list_log]
)
plug(
configs = Pleroma.Repo.all(Config)
if configs == [] do
- errors(conn, {:error, "To use dynamic configuration migrate your settings to database."})
+ errors(
+ conn,
+ {:error, "To use configuration from database migrate your settings to database."}
+ )
else
conn
|> put_view(ConfigView)
end
defp configurable_from_database(conn) do
- if Pleroma.Config.get([:configurable_from_database]) do
+ if Pleroma.Config.get(:configurable_from_database) do
:ok
else
- errors(conn, {:error, "To use this endpoint you need to enable dynamic configuration."})
+ errors(
+ conn,
+ {:error, "To use this endpoint you need to enable configuration from database."}
+ )
end
end