From 16d3d791ea587e242067328d3cc5a0fafd376710 Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Wed, 14 Feb 2024 13:15:41 +0100 Subject: [PATCH] bus: fix jape --- bus/bus.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bus/bus.go b/bus/bus.go index 10c610296e..77363dac9e 100644 --- a/bus/bus.go +++ b/bus/bus.go @@ -1348,11 +1348,13 @@ func (b *bus) slabbuffersHandlerGET(jc jape.Context) { } func (b *bus) objectsStatshandlerGET(jc jape.Context) { - opts := api.ObjectsStatsOpts{} - if jc.DecodeForm(("bucket"), &opts.Bucket) != nil { + var bucket string + if jc.DecodeForm(("bucket"), &bucket) != nil { return } - info, err := b.ms.ObjectsStats(jc.Request.Context(), opts) + info, err := b.ms.ObjectsStats(jc.Request.Context(), api.ObjectsStatsOpts{ + Bucket: bucket, + }) if jc.Check("couldn't get objects stats", err) != nil { return }