From 7688856e973768a1d0c6af6392ab4946aba3eb6d Mon Sep 17 00:00:00 2001 From: Christopher Roberts Date: Thu, 17 Apr 2025 14:38:32 -0500 Subject: [PATCH 1/2] add a filter to not query destroyed buckets. --- internal/rest-client/buckets.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rest-client/buckets.go b/internal/rest-client/buckets.go index 276f23c..e2ef4f9 100644 --- a/internal/rest-client/buckets.go +++ b/internal/rest-client/buckets.go @@ -44,7 +44,7 @@ type BucketsList struct { } func (fb *FBClient) GetBuckets() *BucketsList { - uri := "/buckets" + uri := "/buckets?destroyed=false" result := new(BucketsList) res, _ := fb.RestClient.R(). SetResult(&result). From 4f85f9a83577e1db7af03841431c54aaeeb8cf89 Mon Sep 17 00:00:00 2001 From: Christopher Roberts Date: Tue, 22 Apr 2025 03:48:18 -0500 Subject: [PATCH 2/2] only get current buckets in GET /buckets --- internal/rest-client/buckets.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/rest-client/buckets.go b/internal/rest-client/buckets.go index e2ef4f9..c65867e 100644 --- a/internal/rest-client/buckets.go +++ b/internal/rest-client/buckets.go @@ -44,10 +44,11 @@ type BucketsList struct { } func (fb *FBClient) GetBuckets() *BucketsList { - uri := "/buckets?destroyed=false" + uri := "/buckets" result := new(BucketsList) res, _ := fb.RestClient.R(). SetResult(&result). + SetQueryParam("destroyed", "false"). Get(uri) if res.StatusCode() == 401 { fb.RefreshSession()