From cfeedd05e8095f4d6c89fc17ebef643510d98ae2 Mon Sep 17 00:00:00 2001 From: Daniel Bennett Date: Tue, 18 Jun 2024 12:31:12 -0500 Subject: [PATCH] api: use the task in Allocations.GetPauseState (#23377) --- .changelog/23377.txt | 3 +++ api/allocations.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/23377.txt diff --git a/.changelog/23377.txt b/.changelog/23377.txt new file mode 100644 index 000000000..54dd5baf6 --- /dev/null +++ b/.changelog/23377.txt @@ -0,0 +1,3 @@ +```release-note:bug +api: (Enterprise) fixed Allocations.GetPauseState method discarding the task argument +``` diff --git a/api/allocations.go b/api/allocations.go index 4c52eb074..d4b91ccc6 100644 --- a/api/allocations.go +++ b/api/allocations.go @@ -251,7 +251,7 @@ func (a *Allocations) SetPauseState(alloc *Allocation, q *QueryOptions, task, st // The ?task= query parameter must be set. func (a *Allocations) GetPauseState(alloc *Allocation, q *QueryOptions, task string) (string, *QueryMeta, error) { var resp AllocGetPauseResponse - qm, err := a.client.query("/v1/client/allocation/"+alloc.ID+"/pause", &resp, q) + qm, err := a.client.query("/v1/client/allocation/"+alloc.ID+"/pause?task="+task, &resp, q) state := resp.ScheduleState return state, qm, err }