fix: No shallow copy needed when looking at r.Form (#18499)

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
This commit is contained in:
Shubhendu 2023-11-24 23:16:55 +05:30 committed by GitHub
parent 3369eeb920
commit dd6ea18901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,8 +70,7 @@ func (a adminAPIHandlers) SiteReplicationAdd(w http.ResponseWriter, r *http.Requ
}
func getSRAddOptions(r *http.Request) (opts madmin.SRAddOptions) {
q := r.Form
opts.ReplicateILMExpiry = q.Get("replicateILMExpiry") == "true"
opts.ReplicateILMExpiry = r.Form.Get("replicateILMExpiry") == "true"
return
}
@ -411,9 +410,8 @@ func (a adminAPIHandlers) SiteReplicationEdit(w http.ResponseWriter, r *http.Req
}
func getSREditOptions(r *http.Request) (opts madmin.SREditOptions) {
q := r.Form
opts.DisableILMExpiryReplication = q.Get("disableILMExpiryReplication") == "true"
opts.EnableILMExpiryReplication = q.Get("enableILMExpiryReplication") == "true"
opts.DisableILMExpiryReplication = r.Form.Get("disableILMExpiryReplication") == "true"
opts.EnableILMExpiryReplication = r.Form.Get("enableILMExpiryReplication") == "true"
return
}