mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Add sequences field to search book response
This commit is contained in:
@@ -26,6 +26,7 @@ class Book(BaseModel):
|
||||
uploaded: date
|
||||
authors: list[Author]
|
||||
translators: list[Author]
|
||||
sequences: list[Sequence]
|
||||
annotation_exists: bool
|
||||
|
||||
|
||||
@@ -40,7 +41,6 @@ class BookBaseInfo(BaseModel):
|
||||
|
||||
|
||||
class BookDetail(RemoteBook):
|
||||
sequences: list[Sequence]
|
||||
genres: list[BookGenre]
|
||||
is_deleted: bool
|
||||
pages: Optional[int]
|
||||
|
||||
@@ -92,7 +92,7 @@ class GetRandomBookService(GetRandomService[BookDB, RandomBookServiceQuery]):
|
||||
class BookMeiliSearchService(MeiliSearchService):
|
||||
MODEL_CLASS = BookDB
|
||||
PREFETCH_RELATED = ["source"]
|
||||
SELECT_RELATED = ["authors", "translators", "annotations"]
|
||||
SELECT_RELATED = ["authors", "translators", "annotations", "sequences"]
|
||||
|
||||
MS_INDEX_NAME = "books"
|
||||
MS_INDEX_LANG_KEY = "lang"
|
||||
|
||||
Reference in New Issue
Block a user