Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit fd23d58

Browse files
committed
Update get envs to new endpoint
1 parent f614edf commit fd23d58

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/entclient/env.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type Environment struct {
1717
func (c Client) Envs(user *User, org Org) ([]Environment, error) {
1818
var envs []Environment
1919
err := c.requestBody(
20-
"GET", "/api/environments/?user_id="+user.ID+"&organization_id="+org.ID,
20+
"GET", "/api/orgs/"+org.ID+"/members/"+user.ID+"/environments",
2121
nil,
2222
&envs,
2323
)

internal/entclient/error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ func bodyError(resp *http.Response) error {
1212
if err != nil {
1313
return xerrors.Errorf("dump response: %w", err)
1414
}
15-
return xerrors.Errorf("%s", byt)
15+
return xerrors.Errorf("%s\n%s", resp.Request.URL, byt)
1616
}

0 commit comments

Comments
 (0)