mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-25 04:53:06 +00:00
AdminAPI: add date to users
This commit is contained in:
parent
b221d77a6d
commit
167e14416b
|
@ -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 @@ def render("show.json", %{user: user}) 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
|
||||
|
||||
|
|
|
@ -907,7 +907,8 @@ defp user_response(user, attrs \\ %{}) 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…
Reference in a new issue