Revert "Pleroma.Web.AdminAPI.ReportController: dialyzer errors"
This reverts commit bfe626d578
.
This commit is contained in:
parent
39241107d9
commit
da5e0fca4f
@ -45,7 +45,7 @@ defmodule Pleroma.Web.AdminAPI.ReportController do
|
|||||||
end
|
end
|
||||||
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 =
|
result =
|
||||||
Enum.map(reports, fn report ->
|
Enum.map(reports, fn report ->
|
||||||
case CommonAPI.update_report_state(report.id, report.state) do
|
case CommonAPI.update_report_state(report.id, report.state) do
|
||||||
@ -73,7 +73,7 @@ defmodule Pleroma.Web.AdminAPI.ReportController do
|
|||||||
end
|
end
|
||||||
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
|
id: report_id
|
||||||
}) do
|
}) do
|
||||||
with {:ok, _} <- ReportNote.create(user.id, report_id, content),
|
with {:ok, _} <- ReportNote.create(user.id, report_id, content),
|
||||||
|
@ -107,7 +107,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do
|
|||||||
request_body("Parameters", %Schema{
|
request_body("Parameters", %Schema{
|
||||||
type: :object,
|
type: :object,
|
||||||
properties: %{
|
properties: %{
|
||||||
"content" => %Schema{type: :string, description: "The message"}
|
content: %Schema{type: :string, description: "The message"}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
security: [%{"oAuth" => ["admin:write:reports"]}],
|
security: [%{"oAuth" => ["admin:write:reports"]}],
|
||||||
@ -199,9 +199,9 @@ defmodule Pleroma.Web.ApiSpec.Admin.ReportOperation do
|
|||||||
defp update_request do
|
defp update_request do
|
||||||
%Schema{
|
%Schema{
|
||||||
type: :object,
|
type: :object,
|
||||||
required: ["reports"],
|
required: [:reports],
|
||||||
properties: %{
|
properties: %{
|
||||||
"reports" => %Schema{
|
reports: %Schema{
|
||||||
type: :array,
|
type: :array,
|
||||||
items: %Schema{
|
items: %Schema{
|
||||||
type: :object,
|
type: :object,
|
||||||
|
Loading…
Reference in New Issue
Block a user