NOISSUE - Update tags filtering (#3376)

Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
This commit is contained in:
Steve Munene
2026-03-03 17:14:02 +03:00
committed by GitHub
parent 3b2dd09ab4
commit 2c476c17ee
16 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -781,7 +781,7 @@ components:
Tags:
name: tags
description: Channel tags. Multiple tags can be specified separated by comma for OR condition and hyphen for AND condition.
description: Channel tags. Multiple tags can be specified separated by comma for OR condition and plus for AND condition.
in: query
schema:
type: string
+1 -1
View File
@@ -1282,7 +1282,7 @@ components:
Tags:
name: tags
description: Clients tags. Multiple tags can be specified separated by comma for OR condition and hyphen for AND condition.
description: Clients tags. Multiple tags can be specified separated by comma for OR condition and plus for AND condition.
in: query
schema:
type: string
+1 -1
View File
@@ -1182,7 +1182,7 @@ components:
additionalProperties: {}
Tags:
name: tags
description: Domain tags. Multiple tags can be specified separated by comma for OR condition and hyphen for AND condition.
description: Domain tags. Multiple tags can be specified separated by comma for OR condition and plus for AND condition.
in: query
schema:
type: string
+1 -1
View File
@@ -1388,7 +1388,7 @@ components:
Tags:
name: tags
description: Group tags. Multiple tags can be specified separated by comma for OR condition and hyphen for AND condition.
description: Group tags. Multiple tags can be specified separated by comma for OR condition and plus for AND condition.
in: query
schema:
type: string
+1 -1
View File
@@ -1147,7 +1147,7 @@ components:
Tags:
name: tags
description: User tags. Multiple tags can be specified separated by comma for OR condition and hyphen for AND condition.
description: User tags. Multiple tags can be specified separated by comma for OR condition and plus for AND condition.
in: query
schema:
type: string
+1 -1
View File
@@ -759,7 +759,7 @@ func TestListChannels(t *testing.T) {
},
Channels: []channels.Channel{validChannelResp},
},
query: "tags=tag1-tag2-tag3",
query: "tags=tag1%2Btag2%2Btag3",
status: http.StatusOK,
err: nil,
},
+2 -2
View File
@@ -61,8 +61,8 @@ type TagsQuery struct {
func ToTagsQuery(s string) TagsQuery {
switch {
case strings.Contains(s, "-"):
elements := strings.Split(s, "-")
case strings.Contains(s, "+"):
elements := strings.Split(s, "+")
for i := range elements {
elements[i] = strings.TrimSpace(elements[i])
}
+1 -1
View File
@@ -705,7 +705,7 @@ func TestListClients(t *testing.T) {
},
Clients: []clients.Client{client},
},
query: "tags=tag1-tag2-tag3",
query: "tags=tag1%2Btag2%2Btag3",
status: http.StatusOK,
err: nil,
},
+2 -2
View File
@@ -210,8 +210,8 @@ type TagsQuery struct {
func ToTagsQuery(s string) TagsQuery {
switch {
case strings.Contains(s, "-"):
elements := strings.Split(s, "-")
case strings.Contains(s, "+"):
elements := strings.Split(s, "+")
for i := range elements {
elements[i] = strings.TrimSpace(elements[i])
}
+1 -1
View File
@@ -468,7 +468,7 @@ func TestListDomains(t *testing.T) {
Total: 1,
Domains: []domains.Domain{domain},
},
query: "tags=tag1-tag2-tag3",
query: "tags=tag1%2Btag2%2Btag3",
status: http.StatusOK,
err: nil,
},
+2 -2
View File
@@ -137,8 +137,8 @@ type TagsQuery struct {
func ToTagsQuery(s string) TagsQuery {
switch {
case strings.Contains(s, "-"):
elements := strings.Split(s, "-")
case strings.Contains(s, "+"):
elements := strings.Split(s, "+")
for i := range elements {
elements[i] = strings.TrimSpace(elements[i])
}
+1 -1
View File
@@ -1071,7 +1071,7 @@ func TestListGroups(t *testing.T) {
},
Groups: []groups.Group{validGroupResp},
},
query: "tags=tag1-tag2-tag3",
query: "tags=tag1%2Btag2%2Btag3",
status: http.StatusOK,
err: nil,
},
+2 -2
View File
@@ -19,8 +19,8 @@ type TagsQuery struct {
func ToTagsQuery(s string) TagsQuery {
switch {
case strings.Contains(s, "-"):
elements := strings.Split(s, "-")
case strings.Contains(s, "+"):
elements := strings.Split(s, "+")
for i := range elements {
elements[i] = strings.TrimSpace(elements[i])
}
+2 -2
View File
@@ -103,8 +103,8 @@ type TagsQuery struct {
func ToTagsQuery(s string) TagsQuery {
switch {
case strings.Contains(s, "-"):
elements := strings.Split(s, "-")
case strings.Contains(s, "+"):
elements := strings.Split(s, "+")
for i := range elements {
elements[i] = strings.TrimSpace(elements[i])
}
+1 -1
View File
@@ -721,7 +721,7 @@ func TestListUsers(t *testing.T) {
},
Users: []users.User{user},
},
query: "tags=tag1-tag2-tag3",
query: "tags=tag1%2Btag2%2Btag3",
status: http.StatusOK,
authnRes: verifiedSession,
err: nil,
+2 -2
View File
@@ -157,8 +157,8 @@ type TagsQuery struct {
func ToTagsQuery(s string) TagsQuery {
switch {
case strings.Contains(s, "-"):
elements := strings.Split(s, "-")
case strings.Contains(s, "+"):
elements := strings.Split(s, "+")
for i := range elements {
elements[i] = strings.TrimSpace(elements[i])
}