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:
masasibata 2026-07-07 02:46:08 +03:00
parent ebcb571327
commit d1ac557d31

View file

@ -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"""
...