mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
actions: use specific RPC request object and tighten naming. (#19149)
This commit is contained in:
@@ -346,15 +346,15 @@ func (s *HTTPServer) jobActions(resp http.ResponseWriter, req *http.Request, job
|
||||
return nil, CodedError(http.StatusMethodNotAllowed, ErrInvalidMethod)
|
||||
}
|
||||
|
||||
args := structs.JobSpecificRequest{
|
||||
args := structs.JobActionListRequest{
|
||||
JobID: jobID,
|
||||
}
|
||||
if s.parse(resp, req, &args.Region, &args.QueryOptions) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
var out structs.ActionListResponse
|
||||
if err := s.agent.RPC("Job.GetActions", &args, &out); err != nil {
|
||||
var out structs.JobActionListResponse
|
||||
if err := s.agent.RPC(structs.JobGetActionsRPCMethod, &args, &out); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user