mirror of
https://github.com/lucaspalomodevelop/Party.git
synced 2026-03-13 00:07:21 +00:00
replace sendData function with placeholders
This commit is contained in:
parent
a3a13f0b2d
commit
5ac906a56d
@ -71,17 +71,6 @@ function handleSwitchDiv(index) {
|
||||
}
|
||||
}
|
||||
|
||||
function sendData(endpoint) {
|
||||
fetch(endpoint, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(true)
|
||||
})
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Fehler beim Senden der Daten.');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
alert(error.message);
|
||||
});
|
||||
}
|
||||
function skipSong() {}
|
||||
function lastSong() {}
|
||||
function pausePlaySong() {}
|
||||
|
||||
@ -29,9 +29,9 @@
|
||||
<p id="peter" class="peter" onclick="togglePopup()">Peter</p> <!-- Hinzugefügtes "onclick"-Attribut -->
|
||||
|
||||
<p class="songinfo">Song: </p>
|
||||
<div class="topnext" onclick="sendData('/api/music/skip-forward')"></div>
|
||||
<div class="topback" onclick="sendData('/api/music/skip-back')"></div>
|
||||
<div class="toppause" onclick="sendData('/api/music/play')"></div>
|
||||
<div class="topnext" onclick="skipSong()"></div>
|
||||
<div class="topback" onclick="lastSong()"></div>
|
||||
<div class="toppause" onclick="pausePlaySong()"></div>
|
||||
|
||||
<!-- ... (Dein vorhandener HTML-Code) ... -->
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user