added reset
This commit is contained in:
@@ -135,3 +135,10 @@ func attempt(w http.ResponseWriter, req *http.Request) {
|
||||
log.Fatal("cannot marshal solution", err)
|
||||
}
|
||||
}
|
||||
|
||||
func reset(w http.ResponseWriter, req *http.Request) {
|
||||
session, _ := store.Get(req, "Score")
|
||||
session.Values["Score"] = 0
|
||||
session.Save(req, w)
|
||||
http.Redirect(w, req, "/", http.StatusFound)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user