From 2ea26a092ed18c5ee4c4c73f081f82868c16031e Mon Sep 17 00:00:00 2001 From: Vadimka Komissarov Date: Sun, 11 Aug 2024 18:10:33 +0000 Subject: [PATCH] painc fix --- internal/utils/apiv1_response.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/internal/utils/apiv1_response.go b/internal/utils/apiv1_response.go index e320627..9d463a0 100644 --- a/internal/utils/apiv1_response.go +++ b/internal/utils/apiv1_response.go @@ -60,12 +60,9 @@ func AcquireApiResponse() *ApiResponse { } func ReleaseApiResponse(ar *ApiResponse) { - ar.Status = false - if ar.Error != nil { - ar.Error.Code, ar.Error.Message, ar.Error.Description = 0, "", "" - } - if ar.Data != nil { - ar.Data.Code = "" + *ar = ApiResponse{ + Data: &ApiResponseData{}, + Error: &ApiError{}, } apiResponsePool.Put(ar) }