Return the file content for GET /api/pleroma/admin/instance_document/:document_name
This commit is contained in:
parent
582ad5d4e1
commit
c711a2b157
5 changed files with 26 additions and 21 deletions
|
|
@ -14,7 +14,7 @@ defmodule Pleroma.Web.InstanceDocument do
|
|||
@spec get(String.t()) :: {:ok, String.t()} | {:error, atom()}
|
||||
def get(document_name) do
|
||||
case Map.fetch(@instance_documents, document_name) do
|
||||
{:ok, path} -> {:ok, Path.join(Endpoint.url(), path)}
|
||||
{:ok, path} -> {:ok, path}
|
||||
_ -> {:error, :not_found}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue