From 307dafdb9db343358f8a41d3c65072c5907db9cb Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Sun, 2 Feb 2025 12:21:47 -0700 Subject: [PATCH] changes to run on server. --- api/main.go | 4 ++-- music/index.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/main.go b/api/main.go index 54bef6f..36c321b 100644 --- a/api/main.go +++ b/api/main.go @@ -23,9 +23,9 @@ func main() { } client_id := os.Getenv("SPOTIFY_CLIENT_ID") - redirect_uri := "http://localhost/music" + redirect_uri := "cs2440.joshashton.dev/music" - http.HandleFunc("/login", func(w http.ResponseWriter, r *http.Request) { + http.HandleFunc("/spotify-login", func(w http.ResponseWriter, r *http.Request) { scope := "user-top-read" redirectURL := "https://accounts.spotify.com/authorize?" + strings.Join([]string{ diff --git a/music/index.php b/music/index.php index f6945b6..b28428b 100644 --- a/music/index.php +++ b/music/index.php @@ -2,7 +2,7 @@ session_start(); if (!isset($_GET['code'])) { - header('Location: http://localhost:9753/login'); + header('Location: https://api.joshashton.dev/spotify-login'); exit; } ?>