feat: add favorites filter to sounds retrieval and update SoundsPage component

This commit is contained in:
JSC
2025-08-16 21:27:46 +02:00
parent 2e41d5b695
commit 1027a67e37
2 changed files with 9 additions and 7 deletions

View File

@@ -41,6 +41,7 @@ export interface GetSoundsParams {
sort_order?: SortOrder
limit?: number
offset?: number
favorites_only?: boolean
}
export interface GetSoundsResponse {
@@ -77,6 +78,9 @@ export class SoundsService {
if (params?.offset) {
searchParams.append('offset', params.offset.toString())
}
if (params?.favorites_only) {
searchParams.append('favorites_only', 'true')
}
const url = searchParams.toString()
? `/api/v1/sounds/?${searchParams.toString()}`