Skip to content

Commit

Permalink
fix url encoding for package ident
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Nov 7, 2024
1 parent fd6a3c7 commit f164e97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/keygenext/package.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package keygenext

import (
"net/url"

"github.com/keygen-sh/jsonapi-go"
"github.com/keygen-sh/keygen-go/v2"
)
Expand Down Expand Up @@ -62,7 +64,7 @@ func (p *Package) Get() error {
&keygen.ClientOptions{Account: Account, Environment: Environment, Token: Token, PublicKey: PublicKey, UserAgent: UserAgent, APIURL: APIURL},
)

res, err := client.Get("packages/"+p.ID, nil, p)
res, err := client.Get("packages/"+url.PathEscape(p.ID), nil, p)
if err != nil {
if res != nil && len(res.Document.Errors) > 0 {
e := res.Document.Errors[0]
Expand Down

0 comments on commit f164e97

Please sign in to comment.