Renamed user history to search_history and fixed an issue where search history received the entire user object and not just the username
This commit is contained in:
@@ -53,7 +53,7 @@ app.use(function onError(err, req, res, next) {
|
||||
*/
|
||||
router.post('/v1/user', require('./controllers/user/register.js'));
|
||||
router.post('/v1/user/login', require('./controllers/user/login.js'));
|
||||
router.get('/v1/user/history', mustBeAuthenticated, require('./controllers/user/history.js'));
|
||||
router.get('/v1/user/search_history', mustBeAuthenticated, require('./controllers/user/search_history.js'));
|
||||
router.get('/v1/user/requests', mustBeAuthenticated, require('./controllers/user/requests.js'));
|
||||
router.post('/v1/user/authenticate', mustBeAuthenticated, require('./controllers/user/authenticatePlexAccount.js'));
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ function multiSearchController(req, res) {
|
||||
const { query, page } = req.query;
|
||||
|
||||
if (user) {
|
||||
searchHistory.create(user, query)
|
||||
searchHistory.create(user.username, query)
|
||||
}
|
||||
|
||||
return tmdb.multiSearch(query, page)
|
||||
|
||||
Reference in New Issue
Block a user