stubbing handlers
This commit is contained in:
parent
aa2c52c243
commit
81f521ab49
|
@ -78,7 +78,7 @@ func LoginPostHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
session, _ := store.Get(r, "c_user")
|
session, _ := store.Get(r, "c_user")
|
||||||
session.Values["username"] = user.Username
|
session.Values["username"] = user.Username
|
||||||
session.Save(r, w)
|
session.Save(r, w)
|
||||||
http.Redirect(w, r, "/home", http.StatusFound)
|
http.Redirect(w, r, "/home", http.StatusFound) // TODO: $GET['redirect']
|
||||||
} else {
|
} else {
|
||||||
time.Sleep(500 * time.Millisecond) // WEAK bypassable poor mans rate limiting for failed logins
|
time.Sleep(500 * time.Millisecond) // WEAK bypassable poor mans rate limiting for failed logins
|
||||||
session, _ := store.Get(r, "c_user")
|
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) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue