Merge branch 'feature/allow-user-query-via-id' into 'develop'
Admin API: Allow querying user by ID See merge request pleroma/pleroma!1380
This commit is contained in:
commit
670a77ecbc
@ -8,9 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- MRF: Support for priming the mediaproxy cache (`Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`)
|
||||
Configuration: `federation_incoming_replies_max_depth` option
|
||||
- Mastodon API: Support for the [`tagged` filter](https://github.com/tootsuite/mastodon/pull/9755) in [`GET /api/v1/accounts/:id/statuses`](https://docs.joinmastodon.org/api/rest/accounts/#get-api-v1-accounts-id-statuses)
|
||||
- Mastodon API, streaming: Add support for passing the token in the `Sec-WebSocket-Protocol` header
|
||||
- Admin API: Return users' tags when querying reports
|
||||
- Admin API: Return avatar and display name when querying users
|
||||
- Mastodon API, streaming: Add support for passing the token in the `Sec-WebSocket-Protocol` header
|
||||
- Admin API: Allow querying user by ID
|
||||
- Added synchronization of following/followers counters for external users
|
||||
|
||||
### Fixed
|
||||
|
@ -176,13 +176,13 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
|
||||
- `nickname`
|
||||
- `status` BOOLEAN field, false value means deactivation.
|
||||
|
||||
## `/api/pleroma/admin/users/:nickname`
|
||||
## `/api/pleroma/admin/users/:nickname_or_id`
|
||||
|
||||
### Retrive the details of a user
|
||||
|
||||
- Method: `GET`
|
||||
- Params:
|
||||
- `nickname`
|
||||
- `nickname` or `id`
|
||||
- Response:
|
||||
- On failure: `Not found`
|
||||
- On success: JSON of the user
|
||||
|
@ -74,7 +74,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIController do
|
||||
end
|
||||
|
||||
def user_show(conn, %{"nickname" => nickname}) do
|
||||
with %User{} = user <- User.get_cached_by_nickname(nickname) do
|
||||
with %User{} = user <- User.get_cached_by_nickname_or_id(nickname) do
|
||||
conn
|
||||
|> json(AccountView.render("show.json", %{user: user}))
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user