keywrod slibrary page dsigning
This commit is contained in:
@@ -2281,6 +2281,8 @@ export async function fetchKeywordsLibrary(filters?: {
|
||||
ordering?: string;
|
||||
difficulty_min?: number;
|
||||
difficulty_max?: number;
|
||||
volume_min?: number;
|
||||
volume_max?: number;
|
||||
}): Promise<SeedKeywordResponse> {
|
||||
const params = new URLSearchParams();
|
||||
// Use industry_id and sector_id as per backend get_queryset, but also try industry/sector for filterset_fields
|
||||
@@ -2301,6 +2303,9 @@ export async function fetchKeywordsLibrary(filters?: {
|
||||
// Difficulty range filtering
|
||||
if (filters?.difficulty_min !== undefined) params.append('difficulty_min', filters.difficulty_min.toString());
|
||||
if (filters?.difficulty_max !== undefined) params.append('difficulty_max', filters.difficulty_max.toString());
|
||||
// Volume range filtering
|
||||
if (filters?.volume_min !== undefined) params.append('volume_min', filters.volume_min.toString());
|
||||
if (filters?.volume_max !== undefined) params.append('volume_max', filters.volume_max.toString());
|
||||
|
||||
const queryString = params.toString();
|
||||
return fetchAPI(`/v1/auth/keywords-library/${queryString ? `?${queryString}` : ''}`);
|
||||
|
||||
Reference in New Issue
Block a user