def show(conn, %{id: id}) do
with %Activity{} = activity <- Activity.get_by_id(id) do
- conn
- |> put_view(Pleroma.Web.AdminAPI.StatusView)
- |> render("show.json", %{activity: activity})
+ render(conn, "show.json", %{activity: activity})
else
nil -> {:error, :not_found}
end
parameters: [id_param()],
security: [%{"oAuth" => ["read:statuses"]}],
responses: %{
- 200 => Operation.response("Status", "application/json", Status),
+ 200 => Operation.response("Status", "application/json", status()),
404 => Operation.response("Not Found", "application/json", ApiError)
}
}