From 06b22605cbdf45f772fbcbde4672855136b87193 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sat, 1 Jun 2019 22:58:46 -0400 Subject: [PATCH] killing is mean. zonking is nicer. --- honk.go | 14 +++++++------- views/header.html | 2 +- views/zonkers.html | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/honk.go b/honk.go index 48e459a..5b9c4bb 100644 --- a/honk.go +++ b/honk.go @@ -1055,7 +1055,7 @@ type Zonker struct { Wherefore string } -func killzone(w http.ResponseWriter, r *http.Request) { +func zonkzone(w http.ResponseWriter, r *http.Request) { db := opendatabase() userinfo := login.GetUserInfo(r) rows, err := db.Query("select zonkerid, name, wherefore from zonkers where userid = ?", userinfo.UserID) @@ -1071,14 +1071,14 @@ func killzone(w http.ResponseWriter, r *http.Request) { } templinfo := getInfo(r) templinfo["Zonkers"] = zonkers - templinfo["KillCSRF"] = login.GetCSRF("killitwithfire", r) + templinfo["ZonkCSRF"] = login.GetCSRF("zonkzonk", r) err = readviews.Execute(w, "zonkers.html", templinfo) if err != nil { log.Print(err) } } -func killitwithfire(w http.ResponseWriter, r *http.Request) { +func zonkzonk(w http.ResponseWriter, r *http.Request) { userinfo := login.GetUserInfo(r) itsok := r.FormValue("itsok") if itsok == "iforgiveyou" { @@ -1087,7 +1087,7 @@ func killitwithfire(w http.ResponseWriter, r *http.Request) { db.Exec("delete from zonkers where userid = ? and zonkerid = ?", userinfo.UserID, zonkerid) bitethethumbs() - http.Redirect(w, r, "/killzone", http.StatusSeeOther) + http.Redirect(w, r, "/zonkzone", http.StatusSeeOther) return } wherefore := r.FormValue("wherefore") @@ -1110,7 +1110,7 @@ func killitwithfire(w http.ResponseWriter, r *http.Request) { bitethethumbs() } - http.Redirect(w, r, "/killzone", http.StatusSeeOther) + http.Redirect(w, r, "/zonkzone", http.StatusSeeOther) } func accountpage(w http.ResponseWriter, r *http.Request) { @@ -1299,11 +1299,11 @@ func serve() { loggedin.HandleFunc("/account", accountpage) loggedin.HandleFunc("/chpass", dochpass) loggedin.HandleFunc("/atme", homepage) - loggedin.HandleFunc("/killzone", killzone) + loggedin.HandleFunc("/zonkzone", zonkzone) loggedin.Handle("/honk", login.CSRFWrap("honkhonk", http.HandlerFunc(savehonk))) loggedin.Handle("/bonk", login.CSRFWrap("honkhonk", http.HandlerFunc(savebonk))) loggedin.Handle("/zonkit", login.CSRFWrap("honkhonk", http.HandlerFunc(zonkit))) - loggedin.Handle("/killitwithfire", login.CSRFWrap("killitwithfire", http.HandlerFunc(killitwithfire))) + loggedin.Handle("/zonkzonk", login.CSRFWrap("zonkzonk", http.HandlerFunc(zonkzonk))) loggedin.Handle("/saveuser", login.CSRFWrap("saveuser", http.HandlerFunc(saveuser))) loggedin.HandleFunc("/honkers", showhonkers) loggedin.HandleFunc("/h/{name:[[:alnum:]]+}", showhonker) diff --git a/views/header.html b/views/header.html index eee6c3a..18ce358 100644 --- a/views/header.html +++ b/views/header.html @@ -17,7 +17,7 @@ {{ .UserInfo.Username }} honkers combos -killzone +zonkzone account {{ else }} {{ if .ShowRSS }} diff --git a/views/zonkers.html b/views/zonkers.html index 9767eb1..cbef52d 100644 --- a/views/zonkers.html +++ b/views/zonkers.html @@ -2,9 +2,9 @@

-

-kill another zonker - + +it's zonking time! +

- name

@@ -19,16 +19,16 @@

-

+


-{{ $killcsrf := .KillCSRF }} +{{ $zonkcsrf := .ZonkCSRF }} {{ range .Zonkers }}

What: {{ .Name }}

Where: {{ .Wherefore }} -

- + +