logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: 39241107d96775a7e854f777316a907ee8ddea35
parent 1fa1a93cd6ffefaa80a660fa48968f83b925b21a
Author: Mark Felder <feld@feld.me>
Date:   Tue, 30 Jan 2024 14:13:56 -0500

Revert "Pleroma.Web.AdminAPI.InstanceDocumentController: fix dialyzer error"

This reverts commit a3024dd5ac28bc23a91b12fa15ab56d15c1c341d.

Diffstat:

Mlib/pleroma/web/admin_api/controllers/instance_document_controller.ex2+-
Mlib/pleroma/web/api_spec/operations/admin/instance_document_operation.ex4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/pleroma/web/admin_api/controllers/instance_document_controller.ex b/lib/pleroma/web/admin_api/controllers/instance_document_controller.ex @@ -27,7 +27,7 @@ defmodule Pleroma.Web.AdminAPI.InstanceDocumentController do 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 json(conn, %{"url" => url}) end diff --git a/lib/pleroma/web/api_spec/operations/admin/instance_document_operation.ex b/lib/pleroma/web/api_spec/operations/admin/instance_document_operation.ex @@ -61,9 +61,9 @@ defmodule Pleroma.Web.ApiSpec.Admin.InstanceDocumentOperation do title: "UpdateRequest", description: "POST body for uploading the file", type: :object, - required: ["file"], + required: [:file], properties: %{ - "file" => %Schema{ + file: %Schema{ type: :string, format: :binary, description: "The file to be uploaded, using multipart form data."