fix: POST the scrobble payload instead of GET
This commit is contained in:
@@ -293,11 +293,14 @@ export async function sendPlaybackEvent(path: string, credentials: Credentials)
|
|||||||
// Generate a config from the credentials and dispatch the request
|
// Generate a config from the credentials and dispatch the request
|
||||||
const config = generateConfig(credentials);
|
const config = generateConfig(credentials);
|
||||||
await fetch(`${credentials?.uri}${path}`, {
|
await fetch(`${credentials?.uri}${path}`, {
|
||||||
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
...config.headers,
|
...config.headers,
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
body: JSON.stringify(payload),
|
body: JSON.stringify(payload),
|
||||||
// Swallow and errors from the request
|
// Swallow and errors from the request
|
||||||
}).catch(() => {});
|
}).catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user