Add error messages on invalid session login attempt

This commit is contained in:
Alessio 2025-02-14 16:49:53 -08:00
parent 041af0f91d
commit ff1f70f035

View File

@ -55,6 +55,12 @@ func (app *Application) Login(w http.ResponseWriter, r *http.Request) {
"If you're logging in from a new device, try doing it on the official Twitter site first, then try again here.") "If you're logging in from a new device, try doing it on the official Twitter site first, then try again here.")
} }
app.after_login(w, r, api) app.after_login(w, r, api)
} else {
s := ""
for i := range form.FormErrors {
s += i + " " + form.FormErrors[i] + "\n"
}
panic(s)
} }
return return
} }