Problem: error when paging without items
Solution: check if items are available
This commit is contained in:
parent
7da53da8e1
commit
e9c69c8eac
|
@ -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