Use ObjectInfo.ToLifecycleOpts instead of literal values (#12772)

Promote getLifecycleTransitionTier to a method on lifecycle.Lifecycle.
This commit is contained in:
Krishnan Parthasarathi
2021-07-21 19:12:44 -07:00
committed by GitHub
parent dbd7f74bb9
commit 209e6d00c6
6 changed files with 57 additions and 92 deletions

View File

@@ -80,7 +80,7 @@ func (api objectAPIHandlers) PutBucketLifecycleHandler(w http.ResponseWriter, r
}
// Validate the transition storage ARNs
if err = validateTransitionTier(ctx, bucketLifecycle); err != nil {
if err = validateTransitionTier(bucketLifecycle); err != nil {
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
return
}