Procházet zdrojové kódy

fix: encode artist in albums query

Fela Maslen před 5 roky
rodič
revize
860171f87a
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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;