Skip to content

Commit

Permalink
fix: change libraryId to library_id
Browse files Browse the repository at this point in the history
  • Loading branch information
carddev81 committed Jan 28, 2025
1 parent b374415 commit 07611b0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions frontend/src/Components/LibrarySearchResultsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ const LibrarySearchResultsModal = forwardRef<
}
setIsLoading(true);
setSearchError(null);
const libraryIDs = selectedOptions.length > 0 ? selectedOptions : [libraryId];
const urlParams = libraryIDs.map((libID) => `libraryId=${libID}`).join('&');
const libraryIDs =
selectedOptions.length > 0 ? selectedOptions : [libraryId];
const urlParams = libraryIDs
.map((libID) => `library_id=${libID}`)
.join('&');
try {
const response = (await API.get(
`libraries/search?search=${term}&${urlParams}&page=${page}&per_page=${perPage}`
Expand All @@ -95,7 +98,9 @@ const LibrarySearchResultsModal = forwardRef<
setMeta(response.meta);
setSearchResults(response.data[0]);
} else {
setSearchError('The search could not be completed due to an unexpected error. Please try again later.');
setSearchError(
'The search could not be completed due to an unexpected error. Please try again later.'
);
}
} catch {
setSearchError(
Expand Down

0 comments on commit 07611b0

Please sign in to comment.