Skip to content

Commit

Permalink
Merge pull request #2070 from opengovern/fix-enable-integration
Browse files Browse the repository at this point in the history
fix: fix order
  • Loading branch information
artaasadi authored Nov 26, 2024
2 parents 0bbb490 + de47d18 commit 824dea5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions services/integration/api/integrations/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,9 @@ func (h API) ListIntegrationTypes(c echo.Context) error {
})
if sortBy == "count" {
sort.Slice(items, func(i, j int) bool {
if items[i].Count.Total == items[j].Count.Total {
return items[i].ID < items[j].ID
}
return items[i].Count.Total > items[j].Count.Total
})
}
Expand All @@ -916,6 +919,9 @@ func (h API) ListIntegrationTypes(c echo.Context) error {
})
if sortBy == "count" {
sort.Slice(items, func(i, j int) bool {
if items[i].Count.Total == items[j].Count.Total {
return items[i].ID < items[j].ID
}
return items[i].Count.Total < items[j].Count.Total
})
}
Expand Down

0 comments on commit 824dea5

Please sign in to comment.