diff --git a/fun.go b/fun.go index 79ea499..471f479 100644 --- a/fun.go +++ b/fun.go @@ -88,17 +88,15 @@ func xfiltrate() string { continue } if err != sql.ErrNoRows { - log.Printf("err picking xid: %s", err) - return "" + log.Panicf("err picking xid: %s", err) } - r = db.QueryRow("select fileid from files where name = ?", s) + r = db.QueryRow("select fileid from files where xid = ?", s) err = r.Scan(&x) if err == nil { continue } if err != sql.ErrNoRows { - log.Printf("err picking xid: %s", err) - return "" + log.Panicf("err picking xid: %s", err) } return s } diff --git a/honk.go b/honk.go index 3545cc2..db79a31 100644 --- a/honk.go +++ b/honk.go @@ -703,9 +703,6 @@ func savehonk(w http.ResponseWriter, r *http.Request) { dt := time.Now().UTC() xid := xfiltrate() - if xid == "" { - return - } what := "honk" if rid != "" { what = "tonk"