Bugfixes
This commit is contained in:
@@ -314,6 +314,7 @@ export const searchApi = {
|
||||
maxRating?: number;
|
||||
sortBy?: string;
|
||||
sortDir?: string;
|
||||
facetBy?: string[];
|
||||
}): Promise<SearchResult> => {
|
||||
// Create URLSearchParams to properly handle array parameters
|
||||
const searchParams = new URLSearchParams();
|
||||
@@ -334,6 +335,9 @@ export const searchApi = {
|
||||
if (params.tags && params.tags.length > 0) {
|
||||
params.tags.forEach(tag => searchParams.append('tags', tag));
|
||||
}
|
||||
if (params.facetBy && params.facetBy.length > 0) {
|
||||
params.facetBy.forEach(facet => searchParams.append('facetBy', facet));
|
||||
}
|
||||
|
||||
const response = await api.get(`/stories/search?${searchParams.toString()}`);
|
||||
return response.data;
|
||||
|
||||
Reference in New Issue
Block a user