From f612a7dd8574ed98ac30ca0f3758f49fa5369635 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Wed, 1 Feb 2017 20:46:49 +0100 Subject: [PATCH] madmin: Fix a typo in Locks duration query name (#3673) --- pkg/madmin/lock-commands.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/madmin/lock-commands.go b/pkg/madmin/lock-commands.go index 7285a82d5..3a3b44f56 100644 --- a/pkg/madmin/lock-commands.go +++ b/pkg/madmin/lock-commands.go @@ -93,12 +93,12 @@ func getLockInfos(body io.Reader) ([]VolumeLockInfo, error) { // ListLocks - Calls List Locks Management API to fetch locks matching // bucket, prefix and held before the duration supplied. -func (adm *AdminClient) ListLocks(bucket, prefix string, olderThan time.Duration) ([]VolumeLockInfo, error) { +func (adm *AdminClient) ListLocks(bucket, prefix string, duration time.Duration) ([]VolumeLockInfo, error) { queryVal := make(url.Values) queryVal.Set("lock", "") queryVal.Set("bucket", bucket) queryVal.Set("prefix", prefix) - queryVal.Set("older-than", olderThan.String()) + queryVal.Set("duration", duration.String()) hdrs := make(http.Header) hdrs.Set(minioAdminOpHeader, "list") @@ -125,12 +125,12 @@ func (adm *AdminClient) ListLocks(bucket, prefix string, olderThan time.Duration // ClearLocks - Calls Clear Locks Management API to clear locks held // on bucket, matching prefix older than duration supplied. -func (adm *AdminClient) ClearLocks(bucket, prefix string, olderThan time.Duration) ([]VolumeLockInfo, error) { +func (adm *AdminClient) ClearLocks(bucket, prefix string, duration time.Duration) ([]VolumeLockInfo, error) { queryVal := make(url.Values) queryVal.Set("lock", "") queryVal.Set("bucket", bucket) queryVal.Set("prefix", prefix) - queryVal.Set("older-than", olderThan.String()) + queryVal.Set("duration", duration.String()) hdrs := make(http.Header) hdrs.Set(minioAdminOpHeader, "clear")