Pull request: all: use http method constants

Merge in DNS/adguard-home from method-const to master

Squashed commit of the following:

commit ae6d6699a25ca04ba92aa53258d46e50233a9e00
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jan 29 22:03:59 2021 +0300

    all: use http method constants
This commit is contained in:
Ainar Garipov 2021-02-04 14:15:34 +03:00
parent 0c127039cf
commit 2638e271fe
9 changed files with 62 additions and 38 deletions
internal/home

View file

@ -544,7 +544,7 @@ func marshalTLS(w http.ResponseWriter, data tlsConfig) {
// registerWebHandlers registers HTTP handlers for TLS configuration
func (t *TLSMod) registerWebHandlers() {
httpRegister("GET", "/control/tls/status", t.handleTLSStatus)
httpRegister("POST", "/control/tls/configure", t.handleTLSConfigure)
httpRegister("POST", "/control/tls/validate", t.handleTLSValidate)
httpRegister(http.MethodGet, "/control/tls/status", t.handleTLSStatus)
httpRegister(http.MethodPost, "/control/tls/configure", t.handleTLSConfigure)
httpRegister(http.MethodPost, "/control/tls/validate", t.handleTLSValidate)
}