apiUrl issue
marconunnari opened this issue · 1 comments
marconunnari commented
Steps to Reproduce
- Create a client in the browser as outlined in the readme:
const unsplash = createApi({
apiUrl: 'https://example.com/unsplash-proxy',
});
- Make a search:
unsplash.search.getPhotos({
query: 'cat',
page: 1,
perPage: 10,
color: 'green',
orientation: 'portrait',
});
Observed Behaviour
- The requests are sent to https://example.com/search/photos
Expected Behaviour
- The requests should be sent to https://example.com/unsplash/search/photos
Technical Notes
- I think the problem might be at
unsplash-js/src/helpers/url.ts
Line 17 in c4e57ca
samijaber commented
Addressed in #155. Published in 7.0.2 https://github.com/unsplash/unsplash-js/releases/tag/v7.0.2. Thanks for reporting!