Data was sent as [object object], now we stringify the content first.

This commit is contained in:
2019-10-31 18:41:40 +01:00
parent d56a7d4dfe
commit 470bcdd72e

View File

@@ -135,11 +135,11 @@ const searchTorrents = (query, authorization_token) => {
const addMagnet = (magnet, name, tmdb_id) => {
const url = new URL('v1/pirate/add', SEASONED_URL)
const body = {
const body = JSON.stringify({
magnet: magnet,
name: name,
tmdb_id: tmdb_id
}
})
const headers = { authorization: storage.token }
return fetch(url.href, { method: 'POST', headers, body })