From 6083eb3867a95ef6dab311826a5b9f8f3c1d91be Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Sun, 5 Apr 2020 08:51:40 +0200 Subject: [PATCH] jobqueue/api: don't redundantly set 200 OK This wasn't done in all cases and is redundant, because the default status is 200 OK. --- internal/jobqueue/api.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/internal/jobqueue/api.go b/internal/jobqueue/api.go index 2784036ba..0bd4f7db1 100644 --- a/internal/jobqueue/api.go +++ b/internal/jobqueue/api.go @@ -66,10 +66,6 @@ func notFoundHandler(writer http.ResponseWriter, request *http.Request) { writer.WriteHeader(http.StatusNotFound) } -func statusResponseOK(writer http.ResponseWriter) { - writer.WriteHeader(http.StatusOK) -} - func statusResponseError(writer http.ResponseWriter, code int, errors ...string) { writer.WriteHeader(code) @@ -150,7 +146,6 @@ func (api *API) updateJobHandler(writer http.ResponseWriter, request *http.Reque } return } - statusResponseOK(writer) } func (api *API) addJobImageHandler(writer http.ResponseWriter, request *http.Request, params httprouter.Params) { @@ -180,6 +175,4 @@ func (api *API) addJobImageHandler(writer http.ResponseWriter, request *http.Req } return } - - statusResponseOK(writer) }