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.
This commit is contained in:
Lars Karlitski 2020-04-05 08:51:40 +02:00 committed by Tom Gundersen
parent 4cc459c5cc
commit 6083eb3867

View file

@ -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)
}