api/rcm: use JobStatus() instead of JobResult()
This is the only place where JobResult() method is used. Let's replace it with JobStatus() which provides the same data.
This commit is contained in:
parent
3b6bc69c37
commit
070929b622
1 changed files with 2 additions and 2 deletions
|
|
@ -252,7 +252,7 @@ func (api *API) status(writer http.ResponseWriter, request *http.Request, params
|
|||
}
|
||||
|
||||
// Check that the compose exists
|
||||
status, _, err := api.workers.JobResult(id)
|
||||
status, err := api.workers.JobStatus(id)
|
||||
if err != nil {
|
||||
writer.WriteHeader(http.StatusBadRequest)
|
||||
errorReason.Error = err.Error()
|
||||
|
|
@ -267,5 +267,5 @@ func (api *API) status(writer http.ResponseWriter, request *http.Request, params
|
|||
}
|
||||
|
||||
// TODO: handle error
|
||||
_ = json.NewEncoder(writer).Encode(reply{Status: status.ToString()})
|
||||
_ = json.NewEncoder(writer).Encode(reply{Status: status.State.ToString()})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue