mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Save search term in search history
This commit is contained in:
parent
1725f96d82
commit
8f96c167f8
1 changed files with 6 additions and 0 deletions
|
|
@ -95,6 +95,7 @@ import {
|
|||
updatePage,
|
||||
} from '../../elastic/pages'
|
||||
import { searchHighlights } from '../../elastic/highlights'
|
||||
import { saveSearchHistory } from '../../services/search_history'
|
||||
|
||||
export type PartialArticle = Omit<
|
||||
Article,
|
||||
|
|
@ -905,6 +906,11 @@ export const searchResolver = authorized<
|
|||
}
|
||||
})
|
||||
|
||||
// save in search history
|
||||
if (searchQuery.query) {
|
||||
await saveSearchHistory(claims.uid, searchQuery.query)
|
||||
}
|
||||
|
||||
return {
|
||||
edges,
|
||||
pageInfo: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue