style: Made invalid auth chain less chain-y

This commit is contained in:
Daniel Hall
2024-06-26 15:54:39 -07:00
parent 758c4c7279
commit 21b562b5fe
+1 -6
View File
@@ -32,12 +32,7 @@ func (c *Controller) ServeLoginDo(w http.ResponseWriter, r *http.Request) {
sessLogSave(session, w, r)
http.Redirect(w, r, r.Referer(), http.StatusSeeOther)
return
} else if user == nil {
sessAddFlashW(session, []string{"invalid username / password"})
sessLogSave(session, w, r)
http.Redirect(w, r, r.Referer(), http.StatusSeeOther)
return
} else if user.Password != password {
} else if user == nil || user.Password != password {
sessAddFlashW(session, []string{"invalid username / password"})
sessLogSave(session, w, r)
http.Redirect(w, r, r.Referer(), http.StatusSeeOther)