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

@@ -27,9 +27,10 @@ const tmdbErrorResponse = (error, typeString=undefined) => {
}
class TMDB {
constructor(cache, apiKey, tmdbLibrary) {
this.cache = cache || redisCache;
constructor(apiKey, cache, tmdbLibrary) {
this.tmdbLibrary = tmdbLibrary || moviedb(apiKey);
this.cache = cache || redisCache;
this.cacheTags = {
multiSearch: 'mus',
movieSearch: 'mos',