diff options
Diffstat (limited to 'http_handle_login.go')
-rw-r--r-- | http_handle_login.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/http_handle_login.go b/http_handle_login.go index 1c5c066..c6c1be1 100644 --- a/http_handle_login.go +++ b/http_handle_login.go @@ -26,7 +26,7 @@ func httpHandleLogin(w http.ResponseWriter, r *http.Request, params map[string]a var expiry time.Time var cookie http.Cookie - if r.Method != "POST" { + if r.Method != http.MethodPost { renderTemplate(w, "login", params) return } @@ -80,8 +80,7 @@ func httpHandleLogin(w http.ResponseWriter, r *http.Request, params map[string]a Secure: false, // TODO Expires: expiry, Path: "/", - // TODO: Expire - } + } //exhaustruct:ignore http.SetCookie(w, &cookie) |