Skip to content

V 2#671

Open
Lungsangg wants to merge 48 commits into
developfrom
v-2
Open

V 2#671
Lungsangg wants to merge 48 commits into
developfrom
v-2

Conversation

@Lungsangg

Copy link
Copy Markdown
Member

No description provided.

TenzDelek and others added 22 commits May 27, 2026 09:36
* remove dead import

* remove the traslation and comentary

* root_text on segment leve

* remove root_text legacy

* remove segment_info

* get segment detail

* remove legacy get by id

* remove the segment detail service

* remove put and post partial

* cleanup

* fix segment fetch

* drop sheet concept

* drop text uploader

* remove config

* remove mapping

* remove all

* remvoe  group

* Revert "remvoe  group"

This reverts commit 72925d1.

* Revert "remove all"

This reverts commit c24962a.

* test
#634)

* refactor: remove deprecated collections endpoints and unused functionality

* refactor: remove duplicate collection upload function and unused import

---------

Co-authored-by: TenzDelek <tibetdelek@gmail.com>
Fix missing TableOfContentResponse import and migration duplicate col…
Remove v2 prefix and tags from collections and texts routers
Add v2 suffix to API router tags for collections, segments, and texts
…t detail service to return nested content with sections and segments
@Lungsangg Lungsangg requested a review from tenkus47 June 3, 2026 07:32
Lungsangg added 4 commits June 3, 2026 13:10
…vent unbounded loops

- Added constants for maximum pagination skip (10000), limit (100), and fetch iterations (100)
- Sanitized user-controlled skip and limit inputs in `_fetch_matching_related_segments_by_text_id` to prevent unbounded loops
- Added iteration counter to break out of fetch loop after MAX_FETCH_ITERATIONS to prevent infinite loops
- Applied safe_skip and safe_limit throughout pagination logic for consistent bounds
@sonarqubecloud

sonarqubecloud Bot commented Jun 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
71.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

tenkus47 and others added 20 commits June 3, 2026 15:35
- Introduced an optional `title` parameter in the `fetch_texts_by_category` function to filter results based on a case-insensitive substring of the title.
- Updated related functions and views to support the new title filtering feature.
- Enhanced tests to verify the correct behavior of title filtering in various scenarios, ensuring that the title parameter is correctly passed and handled.
- Set coverage threshold to 80% in the CI configuration.
feat(texts): add title filtering to text fetching endpoints
- Added validation for the MongoDB connection string to ensure it is configured before attempting to initialize the client.
- Implemented error handling for invalid connection strings and other exceptions during client initialization, with appropriate logging.
- Refactored the initialization of Beanie document models to use a constant list for better maintainability.
- Updated tests to cover scenarios where the connection string is empty or invalid, ensuring robust error handling.
feat(mongo_database): enhance MongoDB connection handling in lifespan
…hing functions

- Updated the `fetch_texts_by_category` and `get_texts_by_collection_from_openpecha` functions to accept `category_id` and `collection_id` as optional parameters.
- Adjusted related service and view functions to handle cases where these IDs are not provided, ensuring proper functionality without them.
- Enhanced tests to verify the behavior of the updated functions when no category or collection ID is supplied, confirming that the parameters are omitted as expected.
feat(texts): make category_id and collection_id optional in text fetc…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants