Prechádzať zdrojové kódy

fix: encode artist in albums query

Fela Maslen 5 rokov pred
rodič
commit
860171f87a
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      gmus/src/hooks/fetch/artists.ts

+ 1 - 1
gmus/src/hooks/fetch/artists.ts

@@ -25,7 +25,7 @@ const sendAlbumsRequest = (
   axios: AxiosInstance,
   query: AlbumsQuery,
 ): Promise<AxiosResponse<AlbumsResponse>> =>
-  axios.get(`${getApiUrl()}/albums?artist=${query.artist}`);
+  axios.get(`${getApiUrl()}/albums?artist=${encodeURIComponent(query.artist)}`);
 
 type SongsResponse = {
   artist: string;