From 745e1663ac6395449264d873081434d26341ce2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 15 May 2022 19:15:36 +0200 Subject: [PATCH 1/2] i'm bad at copy-paste MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../operations/mastodon_admin/report_operation.ex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/pleroma/web/api_spec/operations/mastodon_admin/report_operation.ex b/lib/pleroma/web/api_spec/operations/mastodon_admin/report_operation.ex index 00c06bb9b7..51704eca44 100644 --- a/lib/pleroma/web/api_spec/operations/mastodon_admin/report_operation.ex +++ b/lib/pleroma/web/api_spec/operations/mastodon_admin/report_operation.ex @@ -39,7 +39,7 @@ def index_operation do pagination_params(), responses: %{ 200 => - Operation.response("Account", "application/json", %Schema{ + Operation.response("Report", "application/json", %Schema{ title: "ArrayOfReports", type: :array, items: report() @@ -60,7 +60,7 @@ def show_operation do Operation.parameter(:id, :path, :string, "ID of the report") ], responses: %{ - 200 => Operation.response("Account", "application/json", report()), + 200 => Operation.response("Report", "application/json", report()), 401 => Operation.response("Error", "application/json", ApiError), 404 => Operation.response("Error", "application/json", ApiError) } @@ -78,7 +78,7 @@ def resolve_operation do Operation.parameter(:id, :path, :string, "ID of the report") ], responses: %{ - 200 => Operation.response("Account", "application/json", report()), + 200 => Operation.response("Report", "application/json", report()), 400 => Operation.response("Error", "application/json", ApiError), 401 => Operation.response("Error", "application/json", ApiError) } @@ -96,7 +96,7 @@ def reopen_operation do Operation.parameter(:id, :path, :string, "ID of the report") ], responses: %{ - 200 => Operation.response("Account", "application/json", report()), + 200 => Operation.response("Report", "application/json", report()), 400 => Operation.response("Error", "application/json", ApiError), 401 => Operation.response("Error", "application/json", ApiError) } @@ -114,7 +114,7 @@ def assign_to_self_operation do Operation.parameter(:id, :path, :string, "ID of the report") ], responses: %{ - 200 => Operation.response("Account", "application/json", report()), + 200 => Operation.response("Report", "application/json", report()), 400 => Operation.response("Error", "application/json", ApiError), 401 => Operation.response("Error", "application/json", ApiError) } @@ -132,7 +132,7 @@ def unassign_operation do Operation.parameter(:id, :path, :string, "ID of the report") ], responses: %{ - 200 => Operation.response("Account", "application/json", report()), + 200 => Operation.response("Report", "application/json", report()), 400 => Operation.response("Error", "application/json", ApiError), 401 => Operation.response("Error", "application/json", ApiError) } From 7cbca9d18d91130dfb05aa7160b54b16cab2febf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 15 May 2022 22:52:08 +0200 Subject: [PATCH 2/2] MastodonAPI.Admin.AccountView: show registration reason MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- lib/pleroma/web/mastodon_api/admin/views/account_view.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pleroma/web/mastodon_api/admin/views/account_view.ex b/lib/pleroma/web/mastodon_api/admin/views/account_view.ex index c6e2af53bf..7abc685c7b 100644 --- a/lib/pleroma/web/mastodon_api/admin/views/account_view.ex +++ b/lib/pleroma/web/mastodon_api/admin/views/account_view.ex @@ -32,7 +32,7 @@ def render("show.json", %{user: user}) do disabled: !user.is_active, approved: user.is_approved, locale: nil, - invite_request: nil, + invite_request: user.registration_reason, ips: nil, account: account }