Errors. Removed a return from within a resolve and a stray { in addMagnet.

This commit is contained in:
2017-10-21 15:33:40 +02:00
parent 1425da3090
commit b6b9c790e9
2 changed files with 3 additions and 5 deletions

View File

@@ -37,9 +37,7 @@ async function SearchPiratebay(query) {
async function AddMagnet(magnet) {
return await new Promise((resolve) => {
return callPythonAddMagnet(magnet, function(err, results) {
resolve(
return ({ success: true })
)
resolve({ success: true })
})
})
}

View File

@@ -3,7 +3,7 @@
* @Author: KevinMidboe
* @Date: 2017-10-21 09:54:31
* @Last Modified by: KevinMidboe
* @Last Modified time: 2017-10-21 15:22:40
* @Last Modified time: 2017-10-21 15:32:43
*/
const PirateRepository = require('src/pirate/pirateRepository');
@@ -13,7 +13,7 @@ function updateRequested(req, res) {
PirateRepository.AddMagnet(magnet)
.then((result) => {
res.send({result);
res.send(result);
})
.catch((error) => {
res.status(401).send({ success: false, error: error.message });