Revert "Pleroma.Web.AdminAPI.InstanceDocumentController: fix dialyzer error"
This reverts commit a3024dd5ac
.
This commit is contained in:
parent
1fa1a93cd6
commit
39241107d9
|
@ -27,7 +27,7 @@ def show(conn, %{name: document_name}) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update(%{body_params: %{"file" => file}} = conn, %{name: document_name}) do
|
def update(%{body_params: %{file: file}} = conn, %{name: document_name}) do
|
||||||
with {:ok, url} <- InstanceDocument.put(document_name, file.path) do
|
with {:ok, url} <- InstanceDocument.put(document_name, file.path) do
|
||||||
json(conn, %{"url" => url})
|
json(conn, %{"url" => url})
|
||||||
end
|
end
|
||||||
|
|
|
@ -61,9 +61,9 @@ defp update_request do
|
||||||
title: "UpdateRequest",
|
title: "UpdateRequest",
|
||||||
description: "POST body for uploading the file",
|
description: "POST body for uploading the file",
|
||||||
type: :object,
|
type: :object,
|
||||||
required: ["file"],
|
required: [:file],
|
||||||
properties: %{
|
properties: %{
|
||||||
"file" => %Schema{
|
file: %Schema{
|
||||||
type: :string,
|
type: :string,
|
||||||
format: :binary,
|
format: :binary,
|
||||||
description: "The file to be uploaded, using multipart form data."
|
description: "The file to be uploaded, using multipart form data."
|
||||||
|
|
Loading…
Reference in New Issue