From 0f6955c30e26b5d8bad4eb2360993e7e3cf708d6 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 15 Jan 2020 12:22:56 +0100 Subject: v2: stats: fix errors Also add some comments. Signed-off-by: Valentin Rothberg --- pkg/api/handlers/utils/handler.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/api/handlers/utils') diff --git a/pkg/api/handlers/utils/handler.go b/pkg/api/handlers/utils/handler.go index 8c2110f97..65698bfd3 100644 --- a/pkg/api/handlers/utils/handler.go +++ b/pkg/api/handlers/utils/handler.go @@ -33,6 +33,7 @@ func WriteResponse(w http.ResponseWriter, code int, value interface{}) { } func WriteJSON(w http.ResponseWriter, code int, value interface{}) { + // FIXME: we don't need to write the header in all/some circumstances. w.Header().Set("Content-Type", "application/json") w.WriteHeader(code) -- cgit v1.2.3-54-g00ecf