Save advanced search terms in search history too
This commit is contained in:
@ -906,9 +906,9 @@ export const searchResolver = authorized<
|
||||
}
|
||||
})
|
||||
|
||||
// save in search history
|
||||
if (searchQuery.query) {
|
||||
await saveSearchHistory(claims.uid, searchQuery.query)
|
||||
// save query, including advanced search terms, in search history
|
||||
if (params.query) {
|
||||
await saveSearchHistory(claims.uid, params.query)
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@ -12,4 +12,6 @@ CREATE TABLE omnivore.search_history (
|
||||
unique (user_id, term)
|
||||
);
|
||||
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON omnivore.search_history TO omnivore_user;
|
||||
|
||||
COMMIT;
|
||||
|
||||
Reference in New Issue
Block a user