move test down where it belongs
Ted Unangst tedu@tedunangst.com
Mon, 28 Oct 2019 14:50:50 -0400
1 files changed,
5 insertions(+),
5 deletions(-)
jump to
M
web.go
→
web.go
@@ -1468,11 +1468,6 @@ combos := strings.TrimSpace(r.FormValue("combos"))
combos = " " + combos + " " honkerid, _ := strconv.ParseInt(r.FormValue("honkerid"), 10, 0) - if url == "" { - http.Error(w, "subscribing to nothing?", http.StatusInternalServerError) - return - } - defer honkerinvalidator.Clear(u.UserID) if honkerid > 0 {@@ -1529,6 +1524,11 @@ log.Printf("update honker err: %s", err)
return } http.Redirect(w, r, "/honkers", http.StatusSeeOther) + return + } + + if url == "" { + http.Error(w, "subscribing to nothing?", http.StatusInternalServerError) return }