Merge 'dev' into 'main'

This commit is contained in:
stSolo
2022-10-03 16:56:47 +03:00
parent 6271fa6d45
commit 5fd450382c
400 changed files with 14394 additions and 13407 deletions

View File

@@ -3,10 +3,8 @@ package rg
import (
"context"
"errors"
"net/http"
"strconv"
"github.com/rudecs/decort-sdk/opts"
"github.com/rudecs/decort-sdk/typed"
)
type UpdateRequest struct {
@@ -30,13 +28,13 @@ func (rgrq UpdateRequest) Validate() error {
return nil
}
func (r RG) Update(ctx context.Context, req UpdateRequest, options ...opts.DecortOpts) (bool, error) {
func (r RG) Update(ctx context.Context, req UpdateRequest) (bool, error) {
if err := req.Validate(); err != nil {
return false, err
}
url := "/cloudapi/rg/update"
res, err := r.client.DecortApiCall(ctx, typed.POST, url, req)
res, err := r.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
return false, err
}