Skip to content

Commit

Permalink
making API endpoint that allows folio numbers in text view mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ayya-vimala committed Sep 19, 2024
1 parent 4c1f742 commit 22bf509
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions api/endpoints/models/text_view_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ class TextParallelsInput(BaseModel):
par_length: int = 0
limits: Optional[Limits]
multi_lingual: list = []
page_number: int = 0

page_number: int = 0
folio: str = ""

class FullMatchText(FullText):
matches: list = []


class TextItem(BaseModel):
page: int
total_pages: int
Expand Down
3 changes: 2 additions & 1 deletion api/endpoints/text_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ async def get_file_text_segments_and_parallels(input: TextParallelsInput) -> Any
"multi_lingual": input.multi_lingual,
"limitcollection_include": limitcollection_include,
"limitcollection_exclude": limitcollection_exclude,
"folio": input.folio
}

text_segments_query_result = execute_query(
Expand All @@ -87,7 +88,7 @@ async def get_file_text_segments_and_parallels(input: TextParallelsInput) -> Any
filename = input.file_name
parallel_ids_type = "parallel_ids"
page_number = input.page_number
print("ALL INPUTS", input)
print("ALL INPUTS 2", input)
if input.active_segment != "none":
page_number = get_page_for_segment(input.active_segment)
filename = get_filename_from_segmentnr(input.active_segment)
Expand Down

0 comments on commit 22bf509

Please sign in to comment.