Skip to content

Commit

Permalink
Update route.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwei37 authored Dec 26, 2024
1 parent e933f05 commit 080ed59
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion app/api/search/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ function searchDocuments(index: SearchIndex, params: SearchParams): SearchResult
key.toLowerCase().includes(params.query.toLowerCase()) ||
document.description.toLowerCase().includes(params.query.toLowerCase()) ||
document.tags.some((tag) => tag.toLowerCase().includes(params.query.toLowerCase()))) &&
(!params.tag || document.tags.includes(params.tag)) && // Tag match
(!params.year || document.date.includes(params.year)) && // Year match
(!params.region || document.region.toLowerCase() === params.region.toLowerCase()) // Region match
) {
Expand Down

0 comments on commit 080ed59

Please sign in to comment.