Skip to content

Commit

Permalink
fix(searchgallery): fix missing search params in GET request
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-ming committed Jan 24, 2024
1 parent 143f9f5 commit a7f3f1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gallery/searchGallery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ export async function searchGallery(
client: ImgurClient,
options: SearchGalleryOptions
): Promise<ImgurApiResponse<GalleryData>> {
const { pathname } = constructSearchGalleryUrl(options);
const { pathname,search } = constructSearchGalleryUrl(options);
// since we're using prefixUrl with got, we have to remove the starting slash or it'll throw
const finalPathname = pathname.slice(1);

return getImgurApiResponseFromResponse(
await client.request({ url: finalPathname }).catch((e) => e.response)
await client.request({ url: finalPathname + search }).catch((e) => e.response)
) as ImgurApiResponse<GalleryData>;
}

0 comments on commit a7f3f1e

Please sign in to comment.