fix(api): case insensitive sort for datasources
The data source list is case sensitive when sorted. This changes the sort to be case insensitive. The test only tests the handler, not the routing or database query.
This commit is contained in:
@@ -91,7 +91,7 @@ func (slice DataSourceList) Len() int {
|
||||
}
|
||||
|
||||
func (slice DataSourceList) Less(i, j int) bool {
|
||||
return slice[i].Name < slice[j].Name
|
||||
return strings.ToLower(slice[i].Name) < strings.ToLower(slice[j].Name)
|
||||
}
|
||||
|
||||
func (slice DataSourceList) Swap(i, j int) {
|
||||
|
||||
Reference in New Issue
Block a user