not sure what the right data range is, but make it a week
This commit is contained in:
parent
adcc0a1339
commit
a8c24583ea
8
honk.go
8
honk.go
|
@ -637,22 +637,22 @@ func getxonk(userid int64, xid string) *Honk {
|
|||
}
|
||||
|
||||
func getpublichonks() []*Honk {
|
||||
dt := time.Now().UTC().Add(-2 * 24 * time.Hour).Format(dbtimeformat)
|
||||
dt := time.Now().UTC().Add(-7 * 24 * time.Hour).Format(dbtimeformat)
|
||||
rows, err := stmtPublicHonks.Query(dt)
|
||||
return getsomehonks(rows, err)
|
||||
}
|
||||
func gethonksbyuser(name string) []*Honk {
|
||||
dt := time.Now().UTC().Add(-2 * 24 * time.Hour).Format(dbtimeformat)
|
||||
dt := time.Now().UTC().Add(-7 * 24 * time.Hour).Format(dbtimeformat)
|
||||
rows, err := stmtUserHonks.Query(name, dt)
|
||||
return getsomehonks(rows, err)
|
||||
}
|
||||
func gethonksforuser(userid int64) []*Honk {
|
||||
dt := time.Now().UTC().Add(-2 * 24 * time.Hour).Format(dbtimeformat)
|
||||
dt := time.Now().UTC().Add(-7 * 24 * time.Hour).Format(dbtimeformat)
|
||||
rows, err := stmtHonksForUser.Query(userid, dt, userid)
|
||||
return getsomehonks(rows, err)
|
||||
}
|
||||
func gethonksforme(userid int64) []*Honk {
|
||||
dt := time.Now().UTC().Add(-4 * 24 * time.Hour).Format(dbtimeformat)
|
||||
dt := time.Now().UTC().Add(-7 * 24 * time.Hour).Format(dbtimeformat)
|
||||
rows, err := stmtHonksForMe.Query(userid, dt, userid)
|
||||
return getsomehonks(rows, err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue