Compare commits
2 Commits
8adfb56274
...
e9c69c8eac
| Author | SHA1 | Date | |
|---|---|---|---|
| e9c69c8eac | |||
| 7da53da8e1 |
|
|
@ -136,7 +136,7 @@ WHERE "channel_id" = $1
|
||||||
qb.WriteString(` AND "published_at" < $2`)
|
qb.WriteString(` AND "published_at" < $2`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qb.WriteString(` ORDER BY "published_at" DESC LIMIT 10`)
|
qb.WriteString(` ORDER BY "published_at" DESC LIMIT 20`)
|
||||||
|
|
||||||
rows, err := conn.QueryContext(context.Background(), qb.String(), args...)
|
rows, err := conn.QueryContext(context.Background(), qb.String(), args...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -180,8 +180,7 @@ WHERE "channel_id" = $1
|
||||||
return tl, err
|
return tl, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: should only be set of there are more items available
|
if len(tl.Items) > 0 && hasMoreBefore(conn, tl.Items[0].Published) {
|
||||||
if hasMoreBefore(conn, tl.Items[0].Published) {
|
|
||||||
tl.Paging.Before = tl.Items[0].Published
|
tl.Paging.Before = tl.Items[0].Published
|
||||||
}
|
}
|
||||||
if hasMoreAfter(conn, last) {
|
if hasMoreAfter(conn, last) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user