From 0746776b1762c70aef501c887d176ae739e06663 Mon Sep 17 00:00:00 2001 From: Akhilesh Pandey <1akhil.pandey@gmail.com> Date: Wed, 2 Aug 2023 19:05:18 +0530 Subject: [PATCH] fix: PrincipalFilter parser for listing principals --- internal/api/request/principal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/request/principal.go b/internal/api/request/principal.go index aa3e0ebb4..8047381eb 100644 --- a/internal/api/request/principal.go +++ b/internal/api/request/principal.go @@ -61,7 +61,7 @@ func ParseUserFilter(r *http.Request) *types.UserFilter { // ParsePrincipalTypes extracts the principal types from the url. func ParsePrincipalTypes(r *http.Request) []enum.PrincipalType { - pTypesRaw := r.Form[QueryParamType] + pTypesRaw := r.URL.Query()[QueryParamType] m := make(map[enum.PrincipalType]struct{}) // use map to eliminate duplicates for _, pTypeRaw := range pTypesRaw { if pType, ok := enum.PrincipalType(pTypeRaw).Sanitize(); ok {