Changed the variable for saving to searchHistory to be set when user is not false.

This commit is contained in:
2017-10-22 18:04:20 +02:00
parent 7952e6015a
commit 1925c2a5e3

View File

@@ -13,10 +13,9 @@ function searchRequestController(req, res) {
Promise.resolve()
.then(() => {
if (user) {
return searchHistory.create(user, query);
if (user !== 'false') {
searchHistory.create(user, query);
}
return null;
})
.then(() => requestRepository.searchRequest(query, page, type))
.then((searchResult) => {