File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -169,13 +169,25 @@ func (c *Client) ListCertificateStores(params *map[string]interface{}) (*[]GetCe
169169 if params != nil {
170170 sId , ok := (* params )["Id" ]
171171 if ok {
172- var resp , err = c .GetCertificateStoreByID (fmt .Sprintf ("%s" , sId .([]string )[0 ]))
173- if err != nil {
174- return nil , err
172+ switch sId .(type ) {
173+ case string :
174+ var resp , err = c .GetCertificateStoreByID (fmt .Sprintf ("%s" , sId .(string )))
175+ if err != nil {
176+ return nil , err
177+ }
178+ return & []GetCertificateStoreResponse {* resp }, nil
179+ case []string :
180+ // Only single ID lookup is supported
181+ lookup := sId .([]string )
182+ if len (lookup ) > 0 {
183+ var resp , err = c .GetCertificateStoreByID (fmt .Sprintf ("%s" , lookup [0 ]))
184+ if err != nil {
185+ return nil , err
186+ }
187+ return & []GetCertificateStoreResponse {* resp }, nil
188+ }
175189 }
176- return & []GetCertificateStoreResponse {* resp }, nil
177190 }
178-
179191 query , _ = buildQuery (* params , "certificateStoreQuery.queryString" )
180192 }
181193
You can’t perform that action at this time.
0 commit comments