Skip to content

Commit d6c6fdb

Browse files
author
ComputerElite
committed
change beamaps api
1 parent 85c0f5e commit d6c6fdb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ var key = false
202202
fetch("https://api.beatmaps.io/maps/hash/" + raw.id.replace("custom_level_", ""), {headers: { 'User-Agent': 'Streamer-tools-client/1.0 (+https://github.com/ComputerElite/streamer-tools-client/)' }}).then((result) => {
203203
result.json().then((json) => {
204204
try {
205-
key = json.versions[0].key
205+
key = json.id
206206
fetchedKey = true
207207
} catch {}
208208
}).catch((err) => {})
@@ -565,7 +565,7 @@ if(config.dcrpe != undefined && config.dcrpe) {
565565
function BSaverRequest(key) {
566566
return new Promise((resolve, reject) => {
567567
console.log("requesting beatsaver key " + key)
568-
fetch("https://api.beatmaps.io/maps/beatsaver/" + key, {headers: { 'User-Agent': 'Streamer-tools-client/1.0 (+https://github.com/ComputerElite/streamer-tools-client/)' }}).then((result) => {
568+
fetch("https://api.beatmaps.io/maps/id/" + key, {headers: { 'User-Agent': 'Streamer-tools-client/1.0 (+https://github.com/ComputerElite/streamer-tools-client/)' }}).then((result) => {
569569
result.json().then((json) => {
570570
resolve(json)
571571
}).catch((err) => {

0 commit comments

Comments
 (0)