Response results are now saved in the object results instead of torrents

This commit is contained in:
2018-02-26 19:58:54 +01:00
parent ec0923f1c0
commit 08b373cba0

View File

@@ -2,7 +2,7 @@
* @Author: KevinMidboe
* @Date: 2017-10-21 09:54:31
* @Last Modified by: KevinMidboe
* @Last Modified time: 2017-10-21 12:12:26
* @Last Modified time: 2018-02-26 19:56:32
*/
const PirateRepository = require('src/pirate/pirateRepository');
@@ -19,7 +19,7 @@ function updateRequested(req, res) {
PirateRepository.SearchPiratebay(query, page, type)
.then((result) => {
res.send({ success: true, torrents: result });
res.send({ success: true, results: result });
})
.catch((error) => {
res.status(401).send({ success: false, error: error.message });