on first load, redirect to login api for spotify to load user's top tracks.

This commit is contained in:
Joshua Ashton
2025-02-02 12:07:01 -07:00
parent c15cba445a
commit be854ce3c5
3 changed files with 32 additions and 30 deletions
+6 -3
View File
@@ -1,6 +1,10 @@
<?php
session_start();
include ('login.php');
if (!isset($_GET['code'])) {
header('Location: http://localhost:9753/login');
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
@@ -13,8 +17,7 @@ include ('login.php');
<body>
<h1>My Favorite Albums</h1>
<button id="switcher" onclick=modeSwitch('core')>Core</button>
<button id="switcher" onclick=modeSwitch('core')>Explore</button>
<div id="content">
<?php include ('explore.php'); ?>
</div>