From 647edb6d25fa1591e61855cb69d587da797f862e Mon Sep 17 00:00:00 2001 From: Darius Rapalis Date: Tue, 11 Mar 2025 19:34:33 +0200 Subject: [PATCH] renamed things so IDE would not yell at me --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 4a8bf40..a4f1c41 100644 --- a/main.go +++ b/main.go @@ -106,12 +106,12 @@ func getAllChirpsHandler(cfg *apiConfig) http.HandlerFunc { func getChirpByIDHandler(cfg *apiConfig) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - uuid, err := uuid.Parse(r.PathValue("chirpID")) + chirpID, err := uuid.Parse(r.PathValue("chirpID")) if err != nil { httpResponse.JSONHandler(w, http.StatusBadRequest, `{"error": "InvalidChirpID"}`) } - chirp, err := cfg.db.GetChirpByID(context.Background(), uuid) + chirp, err := cfg.db.GetChirpByID(context.Background(), chirpID) if err != nil { httpResponse.JSONHandler(w, http.StatusNotFound, `{"error": "ChirpNotFound"}`) }