From e0ed23a0eb22e7927a6e1180a3023713cb8899d7 Mon Sep 17 00:00:00 2001 From: Michael Manganiello Date: Sun, 5 Jan 2025 00:26:59 -0300 Subject: [PATCH] fix: Change rom_id type to int in search endpoint Fixes PostgreSQL query error reported in: https://github.com/rommapp/romm/issues/667#issuecomment-2571434521 --- backend/endpoints/search.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/endpoints/search.py b/backend/endpoints/search.py index e07d757f1..bc74710d5 100644 --- a/backend/endpoints/search.py +++ b/backend/endpoints/search.py @@ -18,7 +18,7 @@ @protected_route(router.get, "/search/roms", [Scope.ROMS_READ]) async def search_rom( request: Request, - rom_id: str, + rom_id: int, search_term: str | None = None, search_by: str = "name", ) -> list[SearchRomSchema]: @@ -26,7 +26,7 @@ async def search_rom( Args: request (Request): FastAPI request - rom_id (str): Rom ID + rom_id (int): Rom ID source (str): Source of the rom search_term (str, optional): Search term. Defaults to None. search_by (str, optional): Search by name or ID. Defaults to "name".