Merge 'dev' into 'main'
This commit is contained in:
@@ -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 RestoreRequest struct {
|
||||
@@ -22,13 +20,13 @@ func (rgrq RestoreRequest) Validate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r RG) Restore(ctx context.Context, req RestoreRequest, options ...opts.DecortOpts) (bool, error) {
|
||||
func (r RG) Restore(ctx context.Context, req RestoreRequest) (bool, error) {
|
||||
if err := req.Validate(); err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
url := "/cloudapi/rg/restore"
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user