actions: use specific RPC request object and tighten naming. (#19149)

This commit is contained in:
James Rasell
2023-11-23 07:42:37 +00:00
committed by GitHub
parent eb8553c16f
commit 532402aa2d
4 changed files with 33 additions and 7 deletions

View File

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