From 6ae8bacbab4449f147781a63864c8c271b957231 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 15 Jan 2016 23:55:40 +0200 Subject: [PATCH] removed unused code --- src/search.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/search.js b/src/search.js index 94bc4a708f..179fbc6a1b 100644 --- a/src/search.js +++ b/src/search.js @@ -22,18 +22,13 @@ search.search = function(data, callback) { return callback(err); } - data.search_query = validator.escape(query); - if (searchIn === 'titles' || searchIn === 'titlesposts') { - searchIn = 'posts'; - } - + data.search_query = validator.escape(data.query); data.time = (process.elapsedTimeSince(start) / 1000).toFixed(2); callback(null, data); } var start = process.hrtime(); - var query = data.query; var searchIn = data.searchIn || 'titlesposts'; if (searchIn === 'posts' || searchIn === 'titles' || searchIn === 'titlesposts') {