summaryrefslogtreecommitdiff
path: root/internal/processing/timeline/list.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/timeline/list.go')
-rw-r--r--internal/processing/timeline/list.go18
1 files changed, 5 insertions, 13 deletions
diff --git a/internal/processing/timeline/list.go b/internal/processing/timeline/list.go
index 830c874a9..80744df15 100644
--- a/internal/processing/timeline/list.go
+++ b/internal/processing/timeline/list.go
@@ -142,25 +142,17 @@ func (p *Processor) ListTimelineGet(ctx context.Context, authed *oauth.Auth, lis
var (
items = make([]interface{}, count)
- nextMaxIDValue string
- prevMinIDValue string
+ nextMaxIDValue = statuses[count-1].GetID()
+ prevMinIDValue = statuses[0].GetID()
)
- for i, item := range statuses {
- if i == count-1 {
- nextMaxIDValue = item.GetID()
- }
-
- if i == 0 {
- prevMinIDValue = item.GetID()
- }
-
- items[i] = item
+ for i := range statuses {
+ items[i] = statuses[i]
}
return util.PackagePageableResponse(util.PageableResponseParams{
Items: items,
- Path: "api/v1/timelines/list/" + listID,
+ Path: "/api/v1/timelines/list/" + listID,
NextMaxIDValue: nextMaxIDValue,
PrevMinIDValue: prevMinIDValue,
Limit: limit,