From f6812ccdc344cb33baf46c191b72d09a284c81fa Mon Sep 17 00:00:00 2001
From: Aleksei Iakovlev <aleksei.iakovlev@gcore.com>
Date: Thu, 14 Mar 2024 14:16:40 +0800
Subject: [PATCH] CDP-617 fix naming

---
 resources/service.go | 4 ++--
 rules/service.go     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/resources/service.go b/resources/service.go
index 4b3f8cc..4896af9 100644
--- a/resources/service.go
+++ b/resources/service.go
@@ -48,13 +48,13 @@ func (s *Service) Update(ctx context.Context, id int64, req *UpdateRequest) (*Re
 func (s *Service) Delete(ctx context.Context, resourceID int64) error {
 	path := fmt.Sprintf("/cdn/resources/%d", resourceID)
 
-	var deactivateRequestBody ActivateRequest = ActivateRequest{
+	var body ActivateRequest = ActivateRequest{
 		Active: false,
 	}
 	var resource Resource
 
 	// deactivate the resource instance before deletion
-	if err := s.r.Request(ctx, http.MethodPatch, path, &deactivateRequestBody, &resource); err != nil {
+	if err := s.r.Request(ctx, http.MethodPatch, path, &body, &resource); err != nil {
 		return fmt.Errorf("request: %w", err)
 	}
 
diff --git a/rules/service.go b/rules/service.go
index 7f422ad..5496984 100644
--- a/rules/service.go
+++ b/rules/service.go
@@ -54,13 +54,13 @@ func (s *Service) Update(ctx context.Context, resourceID, ruleID int64, req *Upd
 func (s *Service) Delete(ctx context.Context, resourceID, ruleID int64) error {
 	path := fmt.Sprintf("/cdn/resources/%d/rules/%d", resourceID, ruleID)
 
-	var deactivateRequestBody ActivateRequest = ActivateRequest{
+	var body ActivateRequest = ActivateRequest{
 		Active: false,
 	}
 	var rule Rule
 
 	// deactivate the rule instance before deletion
-	if err := s.r.Request(ctx, http.MethodPatch, path, &deactivateRequestBody, &rule); err != nil {
+	if err := s.r.Request(ctx, http.MethodPatch, path, &body, &rule); err != nil {
 		return fmt.Errorf("request: %w", err)
 	}