Merge pull request #33 from KevinMidboe/fix/post-magnet-data

Data was sent as [object object], now we stringify the content first.
This commit is contained in:
2019-10-31 18:42:04 +01:00
committed by GitHub

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 })