Browse Source

AdminAPI: add date to users

features/ingestion-listen
Alex Gleason 2 years ago
parent
commit
167e14416b
No known key found for this signature in database GPG Key ID: 7211D1F99744FBB7
2 changed files with 5 additions and 2 deletions
  1. +3
    -1
      lib/pleroma/web/admin_api/views/account_view.ex
  2. +2
    -1
      test/pleroma/web/admin_api/controllers/user_controller_test.exs

+ 3
- 1
lib/pleroma/web/admin_api/views/account_view.ex View File

@@ -8,6 +8,7 @@ defmodule Pleroma.Web.AdminAPI.AccountView do
alias Pleroma.User
alias Pleroma.Web.AdminAPI
alias Pleroma.Web.AdminAPI.AccountView
alias Pleroma.Web.CommonAPI
alias Pleroma.Web.MastodonAPI
alias Pleroma.Web.MediaProxy

@@ -81,7 +82,8 @@ defmodule Pleroma.Web.AdminAPI.AccountView do
"is_approved" => user.is_approved,
"url" => user.uri || user.ap_id,
"registration_reason" => user.registration_reason,
"actor_type" => user.actor_type
"actor_type" => user.actor_type,
"created_at" => CommonAPI.Utils.to_masto_date(user.inserted_at)
}
end



+ 2
- 1
test/pleroma/web/admin_api/controllers/user_controller_test.exs View File

@@ -907,7 +907,8 @@ defmodule Pleroma.Web.AdminAPI.UserControllerTest do
"is_approved" => true,
"url" => user.ap_id,
"registration_reason" => nil,
"actor_type" => "Person"
"actor_type" => "Person",
"created_at" => CommonAPI.Utils.to_masto_date(user.inserted_at)
}
|> Map.merge(attrs)
end


Loading…
Cancel
Save