mirror of
https://github.com/modrinth/code.git
synced 2026-08-28 10:34:53 +00:00
fix: game version filter in search using quotes instead of backticks (#6415)
This commit is contained in:
@@ -6,6 +6,7 @@ import { useRoute } from 'vue-router'
|
||||
|
||||
import { defineMessage, LOCALES, useVIntl } from '../composables/i18n'
|
||||
import type { FilterType, FilterValue, SortType, Tags } from './search'
|
||||
import { formatSearchFilterValue } from './search'
|
||||
import { formatCategory, formatCategoryHeader } from './tag-messages'
|
||||
|
||||
export const SERVER_REGIONS = {
|
||||
@@ -363,11 +364,11 @@ export function useServerSearch(opts: {
|
||||
const included = matched.filter((f) => !f.negative)
|
||||
const excluded = matched.filter((f) => f.negative)
|
||||
if (included.length > 0) {
|
||||
const values = included.map((f) => `"${f.option}"`).join(', ')
|
||||
const values = included.map((f) => formatSearchFilterValue(f.option)).join(', ')
|
||||
parts.push(`${field} IN [${values}]`)
|
||||
}
|
||||
if (excluded.length > 0) {
|
||||
const values = excluded.map((f) => `"${f.option}"`).join(', ')
|
||||
const values = excluded.map((f) => formatSearchFilterValue(f.option)).join(', ')
|
||||
parts.push(`${field} NOT IN [${values}]`)
|
||||
}
|
||||
}
|
||||
@@ -389,11 +390,11 @@ export function useServerSearch(opts: {
|
||||
.map((filter) => filter.projectId)
|
||||
|
||||
if (includedProjectIds.length > 0) {
|
||||
const values = includedProjectIds.map((projectId) => `"${projectId}"`).join(', ')
|
||||
const values = includedProjectIds.map(formatSearchFilterValue).join(', ')
|
||||
parts.push(`project_id IN [${values}]`)
|
||||
}
|
||||
if (excludedProjectIds.length > 0) {
|
||||
const values = excludedProjectIds.map((projectId) => `"${projectId}"`).join(', ')
|
||||
const values = excludedProjectIds.map(formatSearchFilterValue).join(', ')
|
||||
parts.push(`project_id NOT IN [${values}]`)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user