reduce duplicate bonks received slightly
This commit is contained in:
parent
5d340cd1ab
commit
68c465c4ad
|
@ -218,7 +218,7 @@ func savedonk(url string, name, media string) *Donk {
|
||||||
}
|
}
|
||||||
|
|
||||||
func needxonk(userid int64, x *Honk) bool {
|
func needxonk(userid int64, x *Honk) bool {
|
||||||
row := stmtFindXonk.QueryRow(userid, x.XID, x.What)
|
row := stmtFindXonk.QueryRow(userid, x.XID)
|
||||||
err := row.Scan(&x.ID)
|
err := row.Scan(&x.ID)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return false
|
return false
|
||||||
|
|
2
honk.go
2
honk.go
|
@ -1014,7 +1014,7 @@ func prepareStatements(db *sql.DB) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
stmtFindXonk, err = db.Prepare("select honkid from honks where userid = ? and xid = ? and what = ?")
|
stmtFindXonk, err = db.Prepare("select honkid from honks where userid = ? and xid = ?")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue