This commit is contained in:
asteam
2025-09-27 01:06:15 +03:00
parent 1ccc37a104
commit cf584c8123
1175 changed files with 11022 additions and 1832 deletions

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v11/internal/validators"
"repository.basistech.ru/BASIS/dynamix-golang-sdk/v12/internal/validators"
)
// MassDeleteRequest struct to delete several resource groups
@@ -26,18 +26,18 @@ type MassDeleteRequest struct {
}
// MassDelete starts jobs to delete several resource groups
func (r RG) MassDelete(ctx context.Context, req MassDeleteRequest) (bool, error) {
func (r RG) MassDelete(ctx context.Context, req MassDeleteRequest) (string, error) {
err := validators.ValidateRequest(req)
if err != nil {
return false, validators.ValidationErrors(validators.GetErrors(err))
return "", validators.ValidationErrors(validators.GetErrors(err))
}
url := "/cloudbroker/rg/massDelete"
_, err = r.client.DecortApiCall(ctx, http.MethodPost, url, req)
res, err := r.client.DecortApiCall(ctx, http.MethodPost, url, req)
if err != nil {
return false, err
return "", err
}
return true, nil
return string(res), nil
}