Changed the variable for saving to searchHistory to be set when user is not false.
This commit is contained in:
@@ -13,10 +13,9 @@ function searchRequestController(req, res) {
|
|||||||
|
|
||||||
Promise.resolve()
|
Promise.resolve()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (user) {
|
if (user !== 'false') {
|
||||||
return searchHistory.create(user, query);
|
searchHistory.create(user, query);
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
})
|
})
|
||||||
.then(() => requestRepository.searchRequest(query, page, type))
|
.then(() => requestRepository.searchRequest(query, page, type))
|
||||||
.then((searchResult) => {
|
.then((searchResult) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user