workspaces добавлено
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user