From 6daaab1789fb4b02a33768f7835e4fd83217b4a7 Mon Sep 17 00:00:00 2001 From: blotus Date: Mon, 11 Mar 2024 10:54:40 +0100 Subject: [PATCH] support both scope and scopes parameter in decisions filter (#2882) --- pkg/database/decisions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/database/decisions.go b/pkg/database/decisions.go index c4ea0bb11..3175a916f 100644 --- a/pkg/database/decisions.go +++ b/pkg/database/decisions.go @@ -49,7 +49,7 @@ func BuildDecisionRequestWithFilter(query *ent.DecisionQuery, filter map[string] if err != nil { return nil, errors.Wrapf(InvalidFilter, "invalid contains value : %s", err) } - case "scopes": + case "scopes", "scope": //Swagger mentions both of them, let's just support both to make sure we don't break anything scopes := strings.Split(value[0], ",") for i, scope := range scopes { switch strings.ToLower(scope) {