From 3edd2f8d9325d5e7488c1e996c89c12507816e3a Mon Sep 17 00:00:00 2001 From: kandrusyak Date: Mon, 25 Sep 2023 22:20:19 +0300 Subject: [PATCH] logs fix --- pkg/api/apiCall.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/pkg/api/apiCall.go b/pkg/api/apiCall.go index 9e7a6b0..dbbfa79 100644 --- a/pkg/api/apiCall.go +++ b/pkg/api/apiCall.go @@ -35,12 +35,8 @@ func PostRequest(url string, model any, header http.Header, c echo.Context) ([]b return nil, err, nil } - debug, err := json.Marshal(resp.Body) - - if err == nil { - c.Logger().Debug("Response---") - c.Logger().Debug(string(debug)) - } + c.Logger().Debug("Response---") + c.Logger().Debug(string(data)) return data, nil, resp } @@ -69,12 +65,8 @@ func GetRequest(url string, header http.Header, c echo.Context, args ...string) return nil, err, nil } - debug, err := json.Marshal(resp.Body) - - if err == nil { - c.Logger().Debug("Response---") - c.Logger().Debug(string(debug)) - } + c.Logger().Debug("Response---") + c.Logger().Debug(string(data)) return data, nil, resp }