fix searching for site

This commit is contained in:
Hongbo Wu 2023-09-19 19:53:53 +08:00
parent 4ff5484d8e
commit 673ce83c33
2 changed files with 1 additions and 5 deletions

View file

@ -42,7 +42,6 @@ export interface SearchArgs {
recommendedBy?: string
includeContent?: boolean
noFilters?: NoFilter[]
siteName?: string
subscription?: string
}

View file

@ -40,7 +40,6 @@ export interface SearchFilter {
ids: string[]
recommendedBy?: string
noFilters: NoFilter[]
siteName?: string
subscription?: string
}
@ -435,6 +434,7 @@ export const parseSearchQuery = (query: string | undefined): SearchFilter => {
case 'title':
case 'description':
case 'note':
case 'site':
case 'content': {
const fieldFilter = parseFieldFilter(keyword.keyword, keyword.value)
fieldFilter && result.matchFilters.push(fieldFilter)
@ -457,9 +457,6 @@ export const parseSearchQuery = (query: string | undefined): SearchFilter => {
case 'mode':
// mode is ignored and used only by the frontend
break
case 'site':
result.siteName = keyword.value
break
}
}
}