Handle errors

This commit is contained in:
Peter Stuifzand 2019-05-13 21:31:42 +02:00
parent 28d7d953e2
commit 4c1b768a09
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -545,8 +545,11 @@ func (h *mainHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
sessionVar := c.Value
conn.Do("DEL", "session:"+sessionVar)
if err == nil {
sessionVar := c.Value
_, _ = conn.Do("DEL", "session:"+sessionVar)
}
http.Redirect(w, r, "/", 302)
return
} else if r.URL.Path == "/auth/approve" {