Also unpacks the value of username before passing it to searchHistory.
This commit is contained in:
@@ -10,8 +10,9 @@ const searchHistory = new SearchHistory();
|
||||
*/
|
||||
function historyController(req, res) {
|
||||
const user = req.loggedInUser;
|
||||
const username = user == undefined ? undefined : user.username;
|
||||
|
||||
searchHistory.read(user)
|
||||
searchHistory.read(username)
|
||||
.then((searchQueries) => {
|
||||
res.send({ success: true, searchQueries });
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user