refactor: Improve code readability by formatting query parameters in user endpoints and enhancing error handling in sound playback

This commit is contained in:
JSC
2025-08-19 22:09:50 +02:00
parent a660cc1861
commit 560ccd3f7e
10 changed files with 177 additions and 84 deletions

View File

@@ -65,7 +65,8 @@ async def get_user_extractions( # noqa: PLR0913
current_user: Annotated[User, Depends(get_current_active_user_flexible)],
extraction_service: Annotated[ExtractionService, Depends(get_extraction_service)],
search: Annotated[
str | None, Query(description="Search in title, URL, or service"),
str | None,
Query(description="Search in title, URL, or service"),
] = None,
sort_by: Annotated[str, Query(description="Sort by field")] = "created_at",
sort_order: Annotated[str, Query(description="Sort order (asc/desc)")] = "desc",
@@ -131,7 +132,8 @@ async def get_extraction(
async def get_all_extractions( # noqa: PLR0913
extraction_service: Annotated[ExtractionService, Depends(get_extraction_service)],
search: Annotated[
str | None, Query(description="Search in title, URL, or service"),
str | None,
Query(description="Search in title, URL, or service"),
] = None,
sort_by: Annotated[str, Query(description="Sort by field")] = "created_at",
sort_order: Annotated[str, Query(description="Sort order (asc/desc)")] = "desc",