re-arranged user flow to display assignment first, with the optional button to access information from spotify.

This commit is contained in:
Joshua Ashton
2025-02-04 12:34:29 -07:00
parent 1888f11fe5
commit ea1def7409
111 changed files with 12269 additions and 128 deletions
+3 -10
View File
@@ -1,8 +1,6 @@
package main
import (
"crypto/rand"
"fmt"
"github.com/joho/godotenv"
"log"
"net/http"
@@ -10,22 +8,17 @@ import (
"strings"
)
func generateRandomString(length int) string {
var b = make([]byte, length)
rand.Read(b)
return fmt.Sprintf("%x", b)
}
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
err := godotenv.Load("../music/.env")
err := godotenv.Load("../music/explore/.env")
if err != nil {
log.Fatalf("Error loading .env file: %s", err)
}
client_id := os.Getenv("SPOTIFY_CLIENT_ID")
redirect_uri := "https://cs2440.joshashton.dev/music"
redirect_uri := "https://cs2440.joshashton.dev/music/explore"
//redirect_uri := "http://localhost/music/explore"
scope := "user-top-read"
redirectURL := "https://accounts.spotify.com/authorize?" + strings.Join([]string{