From 354e06a963e6831d413064c4ef2acc95a7224415 Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Sun, 22 Oct 2017 17:03:40 +0200 Subject: [PATCH] Removed searchHistory from tmdb class. --- .../src/webserver/controllers/tmdb/searchMedia.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/seasoned_api/src/webserver/controllers/tmdb/searchMedia.js b/seasoned_api/src/webserver/controllers/tmdb/searchMedia.js index 2eb66f5..4443bde 100644 --- a/seasoned_api/src/webserver/controllers/tmdb/searchMedia.js +++ b/seasoned_api/src/webserver/controllers/tmdb/searchMedia.js @@ -1,28 +1,19 @@ -const SearchHistory = require('src/searchHistory/searchHistory'); 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 searchHistory = new SearchHistory(); /** - * Controller: Search for movies by query, page and optionally adult + * Controller: Search for movies by query, page and optional type * @param {Request} req http request variable * @param {Response} res * @returns {Callback} */ function searchMediaController(req, res) { - const user = req.loggedInUser; const { query, page, type } = req.query; Promise.resolve() - .then(() => { - if (user) { - return searchHistory.create(user, query); - } - return null; - }) .then(() => tmdb.search(query, page, type)) .then((movies) => { if (movies !== undefined || movies.length > 0) {