|
1 | 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ |
2 | | -import { eq, and, or, like, desc, asc } from 'drizzle-orm'; |
| 2 | +import { eq, and, or, ilike, desc, asc } from 'drizzle-orm'; |
3 | 3 | import { getSchema } from '../db/index'; |
4 | 4 | import type { AnyDatabase } from '../db'; |
5 | 5 | import type { FastifyBaseLogger } from 'fastify'; |
@@ -297,16 +297,16 @@ export class McpCatalogService { |
297 | 297 | const searchTerm = `%${filters.search}%`; |
298 | 298 | whereConditions.push( |
299 | 299 | or( |
300 | | - like(this.mcpServers.name, searchTerm), |
301 | | - like(this.mcpServers.description, searchTerm), |
302 | | - like(this.mcpServers.tags, searchTerm) |
| 300 | + ilike(this.mcpServers.name, searchTerm), |
| 301 | + ilike(this.mcpServers.description, searchTerm), |
| 302 | + ilike(this.mcpServers.tags, searchTerm) |
303 | 303 | ) |
304 | 304 | ); |
305 | 305 | } |
306 | 306 | if (filters.tags) { |
307 | 307 | const tagList = filters.tags.split(',').map(tag => tag.trim()).filter(tag => tag.length > 0); |
308 | 308 | if (tagList.length > 0) { |
309 | | - const tagConditions = tagList.map(tag => like(this.mcpServers.tags, `%${tag}%`)); |
| 309 | + const tagConditions = tagList.map(tag => ilike(this.mcpServers.tags, `%${tag}%`)); |
310 | 310 | whereConditions.push(or(...tagConditions)); |
311 | 311 | } |
312 | 312 | } |
|
0 commit comments