From 32cb834d45e9e5695b909805892cfe7bcfb3e0ac Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Mon, 28 Oct 2019 14:50:50 -0400 Subject: [PATCH] move test down where it belongs --- web.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web.go b/web.go index 8df5cf9..880dcef 100644 --- a/web.go +++ b/web.go @@ -1468,11 +1468,6 @@ func submithonker(w http.ResponseWriter, r *http.Request) { 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 { @@ -1532,6 +1527,11 @@ func submithonker(w http.ResponseWriter, r *http.Request) { return } + if url == "" { + http.Error(w, "subscribing to nothing?", http.StatusInternalServerError) + return + } + flavor := "presub" if peep == "peep" { flavor = "peep"