diff options
Diffstat (limited to 'api/addHistory.php')
-rw-r--r-- | api/addHistory.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/api/addHistory.php b/api/addHistory.php index 117fc06..e5dea25 100644 --- a/api/addHistory.php +++ b/api/addHistory.php @@ -5,6 +5,9 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.php"; global $songs; global $_PROFILE; global $history; if (!isset($_GET["i"]) || !isset($songs[$_GET["i"]])) return; -$history[] = $_GET["i"]; +$history[] = [ + "item" => $_GET["i"], + "date" => date('c') +]; file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/users/" . $_PROFILE["id"] . "-history.json", json_encode($history));
\ No newline at end of file |