Response results are now saved in the object results instead of torrents
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: KevinMidboe
|
* @Author: KevinMidboe
|
||||||
* @Date: 2017-10-21 09:54:31
|
* @Date: 2017-10-21 09:54:31
|
||||||
* @Last Modified by: KevinMidboe
|
* @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');
|
const PirateRepository = require('src/pirate/pirateRepository');
|
||||||
@@ -19,7 +19,7 @@ function updateRequested(req, res) {
|
|||||||
|
|
||||||
PirateRepository.SearchPiratebay(query, page, type)
|
PirateRepository.SearchPiratebay(query, page, type)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
res.send({ success: true, torrents: result });
|
res.send({ success: true, results: result });
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
res.status(401).send({ success: false, error: error.message });
|
res.status(401).send({ success: false, error: error.message });
|
||||||
|
|||||||
Reference in New Issue
Block a user