Skip to content

Commit

Permalink
GetLatestRules - fix showing same rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Aibono1225 committed Jan 5, 2024
1 parent 946cbcd commit 2d5799d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SSW.Rules.AzFuncs/Functions/Widget/GetLatestRules.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public async Task<HttpResponseData> Run(
var filteredRules = rules
.Where(r => string.IsNullOrEmpty(githubUsername) || r.GitHubUsername == githubUsername ||
r.CreatedBy == githubUsername || r.UpdatedBy == githubUsername)
.GroupBy(r => r.RuleGuid)
.Select(group => group.First())
.OrderByDescending(r => r.UpdatedAt)
.Skip(skip)
.Take(take);
Expand Down

0 comments on commit 2d5799d

Please sign in to comment.