Skip to content

Commit

Permalink
add filter incident by issueid.
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Ortel <jortel@redhat.com>
  • Loading branch information
jortel committed Jun 11, 2024
1 parent 3f22efd commit 057901d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/analysis.go
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,7 @@ func (h AnalysisHandler) Issue(ctx *gin.Context) {
// @description List all incidents.
// @description filters:
// @description - file
// @description - issue.id
// @tags incidents
// @produce json
// @success 200 {object} []api.Incident
Expand All @@ -799,11 +800,13 @@ func (h AnalysisHandler) Incidents(ctx *gin.Context) {
filter, err := qf.New(ctx,
[]qf.Assert{
{Field: "file", Kind: qf.STRING},
{Field: "issue.id", Kind: qf.STRING},
})
if err != nil {
_ = ctx.Error(err)
return
}
filter = filter.Renamed("issue.id", "issueid")
// Sort
sort := Sort{}
err = sort.With(ctx, &model.Incident{})
Expand Down

0 comments on commit 057901d

Please sign in to comment.