Fix the play button throwing error
This commit is contained in:
parent
8f3061ab99
commit
a5949e0401
1 changed files with 5 additions and 0 deletions
5
mix.php
5
mix.php
|
@ -29,8 +29,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'PUT') {
|
||||||
if (isset($data['mix']) && $data['mix'] != "") {
|
if (isset($data['mix']) && $data['mix'] != "") {
|
||||||
$playcount = new Playcount($data['mix'], $db);
|
$playcount = new Playcount($data['mix'], $db);
|
||||||
$playcount->updatePlaycount();
|
$playcount->updatePlaycount();
|
||||||
|
echo json_encode(['success' => true]);
|
||||||
|
} else {
|
||||||
|
echo json_encode(['error' => 'No mix provided']);
|
||||||
}
|
}
|
||||||
|
exit; // Stop further output
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once 'includes/header.php'; ?>
|
require_once 'includes/header.php'; ?>
|
||||||
<section>
|
<section>
|
||||||
<div class="container py-5">
|
<div class="container py-5">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue