mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Fix
This commit is contained in:
@@ -3,6 +3,7 @@ from typing import TypedDict
|
||||
from app.models import Author
|
||||
from app.services.common import GetRandomService, MeiliSearchService, TRGMSearchService
|
||||
|
||||
|
||||
GET_OBJECT_IDS_QUERY = """
|
||||
SELECT ARRAY(
|
||||
WITH filtered_authors AS (
|
||||
|
||||
@@ -8,6 +8,7 @@ from app.services.common import (
|
||||
TRGMSearchService,
|
||||
)
|
||||
|
||||
|
||||
GET_OBJECT_IDS_QUERY = """
|
||||
SELECT ARRAY(
|
||||
WITH filtered_books AS (
|
||||
|
||||
@@ -15,9 +15,10 @@ from redis import asyncio as aioredis
|
||||
from sqlalchemy import Table
|
||||
|
||||
from app.utils.orjson_default import default as orjson_default
|
||||
from app.utils.pagination import CustomPage, Page
|
||||
from app.utils.pagination import Page
|
||||
from core.config import env_config
|
||||
|
||||
|
||||
MODEL = TypeVar("MODEL", bound=Model)
|
||||
QUERY = TypeVar("QUERY", bound=TypedDict)
|
||||
|
||||
@@ -170,7 +171,7 @@ class BaseSearchService(Generic[MODEL, QUERY], BaseService[MODEL, QUERY]):
|
||||
|
||||
total, objects = await cls.get_limited_objects(query, redis, no_cache)
|
||||
|
||||
return CustomPage.create(items=objects, total=total, params=params)
|
||||
return Page.create(items=objects, total=total, params=params)
|
||||
|
||||
|
||||
class SearchQuery(TypedDict):
|
||||
|
||||
@@ -3,6 +3,7 @@ from typing import TypedDict
|
||||
from app.models import Sequence
|
||||
from app.services.common import GetRandomService, MeiliSearchService, TRGMSearchService
|
||||
|
||||
|
||||
GET_OBJECT_IDS_QUERY = """
|
||||
SELECT ARRAY (
|
||||
WITH filtered_sequences AS (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from app.models import Author
|
||||
from app.services.common import MeiliSearchService, TRGMSearchService
|
||||
|
||||
|
||||
GET_OBJECT_IDS_QUERY = """
|
||||
SELECT ARRAY(
|
||||
WITH filtered_authors AS (
|
||||
|
||||
Reference in New Issue
Block a user