workspaces добавлено

This commit is contained in:
Artem Tsyrulnikov
2026-01-20 13:40:24 +03:00
parent 5d6aa99880
commit 4269b9ae67
15 changed files with 255 additions and 343 deletions

View File

@@ -206,11 +206,7 @@ func (c *Client) GetWorkspaces(
return resp.Items, err
}
func (c *Client) CreateWorkspace(
ctx context.Context,
jwt string,
name string,
) (*Workspace, error) {
func (c *Client) CreateWorkspace(ctx context.Context, jwt string, name string) (Workspace, error) {
req := struct {
Name string `json:"name"`
}{
@@ -218,16 +214,9 @@ func (c *Client) CreateWorkspace(
}
var workspace Workspace
err := c.do(
ctx,
http.MethodPost,
"api/v1/workspaces",
req,
&workspace,
withBearer(jwt),
)
err := c.do(ctx, http.MethodPost, "api/v1/workspaces", req, &workspace, withBearer(jwt))
return &workspace, err
return workspace, err
}
func (c *Client) GetProjects(