From a54de60cc3b2fd6b99e5d66794f53dd331d5c72d Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Sat, 3 Sep 2022 21:35:20 +0700 Subject: [PATCH] chore: handle codacy issues --- api/handler/joke/get.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/handler/joke/get.go b/api/handler/joke/get.go index a8ce427..fb9edea 100644 --- a/api/handler/joke/get.go +++ b/api/handler/joke/get.go @@ -44,7 +44,7 @@ func (d *Dependencies) JokeByID(w http.ResponseWriter, r *http.Request) { id := chi.URLParamFromCtx(r.Context(), "id") // Parse id to int - parsedId, err := strconv.Atoi(id) + parsedID, err := strconv.Atoi(id) if err != nil { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusBadRequest) @@ -52,7 +52,7 @@ func (d *Dependencies) JokeByID(w http.ResponseWriter, r *http.Request) { return } - joke, contentType, err := core.GetJokeByID(r.Context(), d.Bucket, d.Redis, d.Memory, parsedId) + joke, contentType, err := core.GetJokeByID(r.Context(), d.Bucket, d.Redis, d.Memory, parsedID) if err != nil { w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusInternalServerError)