Changed tmdb constructor to have apiKey as first parameter. If cache is not defined we use redis.

This commit is contained in:
2020-04-08 22:54:19 +02:00
parent 578eff30fb
commit 815aaedffb
12 changed files with 17 additions and 39 deletions

View File

@@ -1,9 +1,6 @@
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'));
const tmdb = new TMDB(configuration.get('tmdb', 'apiKey'));
const showCreditsController = (req, res) => {
const showId = req.params.id;
@@ -23,4 +20,4 @@ const showCreditsController = (req, res) => {
})
}
module.exports = showCreditsController;
module.exports = showCreditsController;