stubbing handlers

This commit is contained in:
Dan Ballard 2015-04-29 21:38:40 -07:00
parent aa2c52c243
commit 81f521ab49
1 changed files with 14 additions and 2 deletions

View File

@ -78,7 +78,7 @@ func LoginPostHandler(w http.ResponseWriter, r *http.Request) {
session, _ := store.Get(r, "c_user")
session.Values["username"] = user.Username
session.Save(r, w)
http.Redirect(w, r, "/home", http.StatusFound)
http.Redirect(w, r, "/home", http.StatusFound) // TODO: $GET['redirect']
} else {
time.Sleep(500 * time.Millisecond) // WEAK bypassable poor mans rate limiting for failed logins
session, _ := store.Get(r, "c_user")
@ -89,7 +89,19 @@ func LoginPostHandler(w http.ResponseWriter, r *http.Request) {
}
func addFormHandler( ) {
func addFormHandler(w http.ResponseWriter, r *http.Request, user *user.User) {
}
func addPostHandler(w http.ResponseWriter, r *http.Request, user *user.User) {
}
func templateFormHandler(w http.ResponseWriter, r *http.Request, user *user.User) {
}
func templatePostHandler(w http.ResponseWriter, r *http.Request, user *user.User) {
}