feat: add favorites filter to sounds retrieval and update SoundsPage component
This commit is contained in:
@@ -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()}`
|
||||
|
||||
Reference in New Issue
Block a user