From d1ac557d311c60af0ccb4c2a8b849b6fefff859a Mon Sep 17 00:00:00 2001 From: masasibata Date: Tue, 7 Jul 2026 02:46:08 +0300 Subject: [PATCH] fix(hwid): paginate get_hwid_users via query params, not GET body MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- remnawave/controllers/hwid.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/remnawave/controllers/hwid.py b/remnawave/controllers/hwid.py index 3369b4a..479e1be 100644 --- a/remnawave/controllers/hwid.py +++ b/remnawave/controllers/hwid.py @@ -12,15 +12,19 @@ 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""" ...