1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added simple API key

This commit is contained in:
Krateng
2018-11-30 15:44:30 +01:00
parent 75a70a10b7
commit 19dc86d32a
5 changed files with 32 additions and 15 deletions

View File

@@ -210,9 +210,10 @@ function scrobble(artist,title,seconds) {
console.log("Scrobbling " + artist + " - " + title + "; " + seconds + " seconds playtime")
artiststring = encodeURIComponent(artist)
titlestring = encodeURIComponent(title)
APIKEY = "YDzcmp8JpYHCcvJbDOVT7nEDoyCEND6K" ///obviously this will not be hardcoded later
var xhttp = new XMLHttpRequest();
xhttp.open("POST","http://localhost:42010/db/newscrobble",true);
xhttp.send("artist=" + artiststring + "&title=" + titlestring + "&duration=" + seconds)
xhttp.send("artist=" + artiststring + "&title=" + titlestring + "&duration=" + seconds + "&key=" + APIKEY)
}
function setUpdate() {