fix: case sensitive search in postgres (#1801)

This commit is contained in:
Krrish Sehgal 2025-10-14 11:57:21 +05:30 committed by GitHub
parent 1ebd8e19cb
commit 0d28c0d429
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -405,7 +405,12 @@ func (api *api) ListApps(limit uint64, offset uint64, filters ListAppsFilters, o
if filters.Name != "" {
// searching for "Damus" will return "Damus" and "Damus (1)"
query = query.Where("name LIKE ?", filters.Name+"%")
// Use case-insensitive search for both SQLite and PostgreSQL
if api.db.Dialector.Name() == "postgres" {
query = query.Where("name ILIKE ?", filters.Name+"%")
} else {
query = query.Where("name LIKE ?", filters.Name+"%")
}
}
if filters.AppStoreAppId != "" {