Linted all controllers

This commit is contained in:
2018-02-07 13:51:57 +01:00
parent 81aeed86ef
commit 34982c14fe
20 changed files with 195 additions and 186 deletions

View File

@@ -1,10 +1,10 @@
const configuration = require('src/config/configuration').getInstance();
const Cache = require('src/tmdb/cache');
const TMDB = require('src/tmdb/tmdb');
const cache = new Cache();
const tmdb = new TMDB(cache, configuration.get('tmdb', 'apiKey'));
/**
* Controller: Retrieve nowplaying movies / now airing shows
* @param {Request} req http request variable
@@ -12,15 +12,14 @@ const tmdb = new TMDB(cache, configuration.get('tmdb', 'apiKey'));
* @returns {Callback}
*/
function listSearchController(req, res) {
const listname = req.params.listname;
const { type, id, page } = req.query;
console.log(listname, type, id, page)
tmdb.listSearch(listname, type, id, page)
.then((results) => {
res.send(results);
}).catch((error) => {
res.status(404).send({ success: false, error: error.message });
});
const listname = req.params.listname;
const { type, id, page } = req.query;
tmdb.listSearch(listname, type, id, page)
.then((results) => {
res.send(results);
}).catch((error) => {
res.status(404).send({ success: false, error: error.message });
});
}
module.exports = listSearchController;