Api request #84

Merged
KevinMidboe merged 39 commits from api_request into master 2018-03-19 14:46:19 +00:00
Showing only changes of commit 08b373cba0 - Show all commits

View File

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