fuzzyworld

hawk / commit

More redirect fixes.

0e0eaeffc8fa100edf1375d0fce7f2d7adf87efb · Pavel Safronov · 2023-10-13 02:24:34 -0700 · parents 714f908c0189

More redirect fixes.
 public/main.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/public/main.js b/public/main.js
index 99ee492..61f8b79 100644
--- a/public/main.js
+++ b/public/main.js
@@ -4,12 +4,12 @@ const error = urlParams.get('error');
 if (code) {
     getToken(code).then(() => {
         window.history.replaceState({}, document.title, '/');
-        window.location = '/public/index.html';
+        window.location = getSpotifyRedirectURL();
     })
 } else if (error) {
     console.error(error);
     window.history.replaceState({}, document.title, '/');
-    window.location = '/public/index.html';
+    window.location = getSpotifyRedirectURL();
 }
 
 const accessToken = localStorage.getItem('access_token');