From 8ee3c6473f3e2373303b9cb16ab5f059f9e6369e Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Sat, 15 Apr 2017 18:28:23 +0100 Subject: Revoke multiple certs in a single call --- server/web.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'server/web.go') diff --git a/server/web.go b/server/web.go index edaa394..08162d5 100644 --- a/server/web.go +++ b/server/web.go @@ -240,10 +240,8 @@ func revokeCertHandler(a *appContext, w http.ResponseWriter, r *http.Request) (i return a.login(w, r) } r.ParseForm() - for _, id := range r.Form["cert_id"] { - if err := certstore.Revoke(id); err != nil { - return http.StatusInternalServerError, errors.Wrap(err, "unable to revoke") - } + if err := certstore.Revoke(r.Form["cert_id"]); err != nil { + return http.StatusInternalServerError, errors.Wrap(err, "unable to revoke certs") } http.Redirect(w, r, "/admin/certs", http.StatusSeeOther) return http.StatusSeeOther, nil -- cgit v1.2.3