Mastodon admin API v2 improvements
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
87e6cd3dc0
commit
8626a337f8
4 changed files with 7 additions and 7 deletions
|
|
@ -31,7 +31,7 @@ defmodule Pleroma.Web.ApiSpec.MastodonAdmin.AccountOperation do
|
|||
:active,
|
||||
:query,
|
||||
:boolean,
|
||||
"Filter for currently active accounts??"
|
||||
"Filter for currently active accounts?"
|
||||
),
|
||||
Operation.parameter(
|
||||
:pending,
|
||||
|
|
@ -327,8 +327,8 @@ defmodule Pleroma.Web.ApiSpec.MastodonAdmin.AccountOperation do
|
|||
}
|
||||
}
|
||||
},
|
||||
locale: %Schema{type: :string, format: "date-time", nullable: true},
|
||||
invite_request: %Schema{type: :string, format: "date-time", nullable: true},
|
||||
locale: %Schema{type: :string, nullable: true},
|
||||
invite_request: %Schema{type: :string, nullable: true},
|
||||
role: %Schema{type: :string, nullable: true},
|
||||
confirmed: %Schema{type: :boolean},
|
||||
approved: %Schema{type: :boolean},
|
||||
|
|
|
|||
|
|
@ -119,11 +119,11 @@ defmodule Pleroma.Web.ApiSpec.MastodonAdmin.ReportOperation do
|
|||
account: AccountOperation.account(),
|
||||
target_account: AccountOperation.account(),
|
||||
assigned_account: %Schema{
|
||||
type: AccountOperation.account(),
|
||||
oneOf: [AccountOperation.account()],
|
||||
nullable: true
|
||||
},
|
||||
action_taken_by_account: %Schema{
|
||||
type: AccountOperation.account(),
|
||||
oneOf: [AccountOperation.account()],
|
||||
nullable: true
|
||||
},
|
||||
statuses: %Schema{
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ defmodule Pleroma.Web.MastodonAPI.Admin.ReportController do
|
|||
subject_actor: report.user_actor
|
||||
})
|
||||
|
||||
render(conn, "show.json", Report.extract_report_info(activity))
|
||||
render(conn, "show.json", Report.extract_report_info(report))
|
||||
else
|
||||
{:error, error} ->
|
||||
json_response(conn, :bad_request, %{error: error})
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ defmodule Pleroma.Web.MastodonAPI.Admin.AccountControllerTest do
|
|||
end
|
||||
end
|
||||
|
||||
describe "POST /api/v1/admin/accounts/:id/rejct" do
|
||||
describe "POST /api/v1/admin/accounts/:id/reject" do
|
||||
test "reject account", %{conn: conn} do
|
||||
%{id: id} = user = insert(:user, is_approved: false)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue