made gw-light api more accurate

This commit is contained in:
uh wot 2021-09-02 01:53:25 +02:00
parent 5046b57c6c
commit bb5ad6c8d7
Signed by: uhwot
GPG Key ID: CB2454984587B781
2 changed files with 2 additions and 2 deletions

2
dist/worker.js vendored

File diff suppressed because one or more lines are too long

View File

@ -59,7 +59,7 @@ async function gw_api_call(method, params) {
body: JSON.stringify(params),
}
const response = await fetch(`https://www.deezer.com/ajax/gw-light.php?method=${method}&input=3&api_version=1.0&api_token=${checkForm}`, init)
const response = await fetch(`https://www.deezer.com/ajax/gw-light.php?method=${method}&input=3&api_version=1.0&api_token=${encodeURIComponent(checkForm)}&cid=${Math.floor(Math.random() * 1e9)}`, init)
const json = await response.json()
if (json.error.length !== 0) {