Skip to content

Commit 2ec4c2c

Browse files
committed
Fixed endpoints for project user
1 parent 6c564fe commit 2ec4c2c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

admin_project_user.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ func (c *Client) ListAdminProjectUsers(
4747
after *string,
4848
) (response AdminProjectUserList, err error) {
4949
urlValues := url.Values{}
50-
urlValues.Add("project", projectID)
5150
if limit != nil {
5251
urlValues.Add("limit", fmt.Sprintf("%d", *limit))
5352
}
@@ -60,7 +59,7 @@ func (c *Client) ListAdminProjectUsers(
6059
encodedValues = "?" + urlValues.Encode()
6160
}
6261

63-
urlSuffix := fmt.Sprintf("/v1/projects/%s/users%s", projectID, encodedValues)
62+
urlSuffix := fmt.Sprintf("/organization/projects/%s/users%s", projectID, encodedValues)
6463
req, err := c.newRequest(ctx, http.MethodGet, c.fullURL(urlSuffix))
6564
if err != nil {
6665
return
@@ -85,7 +84,7 @@ func (c *Client) CreateAdminProjectUser(
8584
Role: role,
8685
}
8786

88-
urlSuffix := fmt.Sprintf("/v1/projects/%s/users", projectID)
87+
urlSuffix := fmt.Sprintf("/organization/projects/%s/users", projectID)
8988
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix), withBody(request))
9089
if err != nil {
9190
return
@@ -101,7 +100,7 @@ func (c *Client) RetrieveAdminProjectUser(
101100
projectID string,
102101
userID string,
103102
) (response AdminProjectUser, err error) {
104-
urlSuffix := fmt.Sprintf("/v1/projects/%s/users/%s", projectID, userID)
103+
urlSuffix := fmt.Sprintf("/organization/projects/%s/users/%s", projectID, userID)
105104
req, err := c.newRequest(ctx, http.MethodGet, c.fullURL(urlSuffix))
106105
if err != nil {
107106
return
@@ -124,7 +123,7 @@ func (c *Client) ModifyAdminProjectUser(
124123
Role: role,
125124
}
126125

127-
urlSuffix := fmt.Sprintf("/v1/projects/%s/users/%s", projectID, userID)
126+
urlSuffix := fmt.Sprintf("/organization/projects/%s/users/%s", projectID, userID)
128127
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix), withBody(request))
129128
if err != nil {
130129
return
@@ -140,7 +139,7 @@ func (c *Client) DeleteAdminProjectUser(
140139
projectID string,
141140
userID string,
142141
) (response AdminProjectDeleteResponse, err error) {
143-
urlSuffix := fmt.Sprintf("/v1/projects/%s/users/%s", projectID, userID)
142+
urlSuffix := fmt.Sprintf("/organization/projects/%s/users/%s", projectID, userID)
144143

145144
req, err := c.newRequest(ctx, http.MethodDelete, c.fullURL(urlSuffix))
146145
if err != nil {

0 commit comments

Comments
 (0)