all repos — honk @ 82641e81b2b76dbbf46fc9d2173b1999ab2cff7a

my fork of honk

comment the hot mess, just in case i forget
Ted Unangst tedu@tedunangst.com
Tue, 17 Sep 2019 10:11:10 -0400
commit

82641e81b2b76dbbf46fc9d2173b1999ab2cff7a

parent

0a258477472125e2fe73504d35b8c37ec68fc6b6

1 files changed, 7 insertions(+), 3 deletions(-)

jump to
M web.goweb.go

@@ -841,12 +841,17 @@ log.Printf("no edit")

return } + noise := honk.Noise + if honk.Precis != "" { + noise = honk.Precis + "\n\n" + noise + } + honks := []*Honk{honk} reverbolate(u.UserID, honks) templinfo := getInfo(r) templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r) templinfo["Honks"] = honks - templinfo["Noise"] = honk.Noise + templinfo["Noise"] = noise templinfo["ServerMessage"] = "honk edit" templinfo["UpdateXID"] = honk.XID err := readviews.Execute(w, "honkpage.html", templinfo)

@@ -855,6 +860,7 @@ log.Print(err)

} } +// what a hot mess this function is func submithonk(w http.ResponseWriter, r *http.Request) { rid := r.FormValue("rid") noise := r.FormValue("noise")

@@ -1054,9 +1060,7 @@ honk.Format = "html"

if updatexid != "" { updatehonk(honk) - } else { - err := savehonk(honk) if err != nil { log.Printf("uh oh")