use the right variable

This commit is contained in:
Ted Unangst 2023-03-17 14:24:15 -04:00
parent deec523437
commit ae8d1909d8
1 changed files with 3 additions and 2 deletions

5
web.go
View File

@ -1954,7 +1954,8 @@ func submithonker(w http.ResponseWriter, r *http.Request) *Honker {
flavor = "peep" flavor = "peep"
} }
id, err := savehonker(user, url, name, flavor, combos, mj) var err error
honkerid, err = savehonker(user, url, name, flavor, combos, mj)
if err != nil { if err != nil {
http.Error(w, "had some trouble with that: "+err.Error(), http.StatusInternalServerError) http.Error(w, "had some trouble with that: "+err.Error(), http.StatusInternalServerError)
return nil return nil
@ -1962,7 +1963,7 @@ func submithonker(w http.ResponseWriter, r *http.Request) *Honker {
if flavor == "presub" { if flavor == "presub" {
followyou(user, honkerid, false) followyou(user, honkerid, false)
} }
h.ID = id h.ID = honkerid
return h return h
} }