mirror of
https://github.com/remnawave/python-sdk.git
synced 2026-10-22 20:50:55 +00:00
fix(hwid): paginate get_hwid_users via query params, not GET body
size/start were annotated with AttributeBody, so the SDK serialized them into the GET request body. The API reads pagination from query params, so they were ignored and every call to GET /api/hwid/devices returned a single default page — bulk HWID device enumeration only ever saw the first page. Switch size/start to Query, matching get_top_users_by_hwid_devices on the adjacent /hwid/devices/top-users endpoint. Drop the now-unused AttributeBody import.
This commit is contained in:
parent
ebcb571327
commit
d1ac557d31
1 changed files with 7 additions and 3 deletions
|
|
@ -12,15 +12,19 @@ from remnawave.models import (
|
|||
GetTopUsersByHwidDevicesResponseDto
|
||||
)
|
||||
from rapid_api_client import Path, PydanticBody, Query
|
||||
from remnawave.rapid import AttributeBody, BaseController, post, get
|
||||
from remnawave.rapid import BaseController, post, get
|
||||
|
||||
|
||||
class HWIDUserController(BaseController):
|
||||
@get("/hwid/devices", response_class=GetUserHwidDevicesResponseDto)
|
||||
async def get_hwid_users(
|
||||
self,
|
||||
size: Annotated[int | None, AttributeBody()] = None,
|
||||
start: Annotated[int | None, AttributeBody()] = None,
|
||||
size: Annotated[
|
||||
Optional[int], Query(default=None, description="Page size for pagination")
|
||||
] = None,
|
||||
start: Annotated[
|
||||
Optional[int], Query(default=None, description="Offset for pagination")
|
||||
] = None,
|
||||
) -> GetUserHwidDevicesResponseDto:
|
||||
"""Get all user HWID devices"""
|
||||
...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue