cloudapi: rename composeId → jobId

It's the id from the job.
This commit is contained in:
Lars Karlitski 2020-10-24 11:38:52 +02:00
parent 1f87958681
commit f8c640c7ef

View file

@ -199,14 +199,13 @@ func (server *Server) Compose(w http.ResponseWriter, r *http.Request) {
// ComposeStatus handles a /compose/{id} GET request
func (server *Server) ComposeStatus(w http.ResponseWriter, r *http.Request, id string) {
composeId, err := uuid.Parse(id)
jobId, err := uuid.Parse(id)
if err != nil {
http.Error(w, fmt.Sprintf("Invalid format for parameter id: %s", err), http.StatusBadRequest)
return
}
status, err := server.workers.JobStatus(composeId)
status, err := server.workers.JobStatus(jobId)
if err != nil {
http.Error(w, fmt.Sprintf("Job %s not found: %s", id, err), http.StatusNotFound)
return