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() | ||||
| 	.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) => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user