Revert "Pleroma.Web.AdminAPI.ReportController: dialyzer errors"

This reverts commit bfe626d578.
This commit is contained in:
Mark Felder 2024-01-30 14:14:07 -05:00
parent 39241107d9
commit da5e0fca4f
2 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ def show(conn, %{id: id}) do
end
end
def update(%{assigns: %{user: admin}, body_params: %{"reports" => reports}} = conn, _) do
def update(%{assigns: %{user: admin}, body_params: %{reports: reports}} = conn, _) do
result =
Enum.map(reports, fn report ->
case CommonAPI.update_report_state(report.id, report.state) do
@ -73,7 +73,7 @@ def update(%{assigns: %{user: admin}, body_params: %{"reports" => reports}} = co
end
end
def notes_create(%{assigns: %{user: user}, body_params: %{"content" => content}} = conn, %{
def notes_create(%{assigns: %{user: user}, body_params: %{content: content}} = conn, %{
id: report_id
}) do
with {:ok, _} <- ReportNote.create(user.id, report_id, content),

View File

@ -107,7 +107,7 @@ def notes_create_operation do
request_body("Parameters", %Schema{
type: :object,
properties: %{
"content" => %Schema{type: :string, description: "The message"}
content: %Schema{type: :string, description: "The message"}
}
}),
security: [%{"oAuth" => ["admin:write:reports"]}],
@ -199,9 +199,9 @@ defp account_admin do
defp update_request do
%Schema{
type: :object,
required: ["reports"],
required: [:reports],
properties: %{
"reports" => %Schema{
reports: %Schema{
type: :array,
items: %Schema{
type: :object,