feat: Add favorites filtering to sound retrieval; include user-specific favorite sounds in the API response
This commit is contained in:
@@ -70,6 +70,10 @@ async def get_sounds( # noqa: PLR0913
|
||||
int,
|
||||
Query(description="Number of results to skip", ge=0),
|
||||
] = 0,
|
||||
favorites_only: Annotated[
|
||||
bool,
|
||||
Query(description="Show only favorited sounds"),
|
||||
] = False,
|
||||
) -> SoundsListResponse:
|
||||
"""Get sounds with optional search, filtering, and sorting."""
|
||||
try:
|
||||
@@ -80,6 +84,8 @@ async def get_sounds( # noqa: PLR0913
|
||||
sort_order=sort_order,
|
||||
limit=limit,
|
||||
offset=offset,
|
||||
favorites_only=favorites_only,
|
||||
user_id=current_user.id,
|
||||
)
|
||||
|
||||
# Add favorite indicators for each sound
|
||||
|
||||
Reference in New Issue
Block a user