Skip to content

Commit b054f13

Browse files
tommytroenybelMekksindrerh2
committed
refactor: always convert orderby to lowercase
Co-authored-by: ybelmekk <[email protected]> Co-authored-by: sindrerh2 <[email protected]>
1 parent c960642 commit b054f13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/api/grpcvulnerabilities/vulnerabilities.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ func sanitizeOrderBy(orderBy *vulnerabilities.OrderBy, defaultOrder vulnerabilit
253253
if orderBy.Direction == vulnerabilities.Direction_DESC {
254254
direction = "desc"
255255
}
256-
field := vulnerabilities.OrderByField(orderBy.Field)
256+
field := vulnerabilities.OrderByField(strings.ToLower(orderBy.Field))
257257
if !field.IsValid() {
258258
field = defaultOrder
259259
}

0 commit comments

Comments
 (0)