diff options
author | 2022-10-10 15:52:49 +0200 | |
---|---|---|
committer | 2022-10-10 15:52:49 +0200 | |
commit | 832befd727a257581d774bb6bbdeb0f81cd658e2 (patch) | |
tree | b1fb78172b18f262ded37fd110bc8be318af233d /internal/api | |
parent | [feature] Add opt-in RSS feed for account's latest Public posts (#897) (diff) | |
download | gotosocial-832befd727a257581d774bb6bbdeb0f81cd658e2.tar.xz |
[chore] Make paging logic more generic (#901)
* make paging logic more generic
not just for timelines!
* linty linterson
Diffstat (limited to 'internal/api')
-rw-r--r-- | internal/api/model/paging.go (renamed from internal/api/model/timeline.go) | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/internal/api/model/timeline.go b/internal/api/model/paging.go index 4c9c78a88..195f318c8 100644 --- a/internal/api/model/timeline.go +++ b/internal/api/model/paging.go @@ -18,12 +18,10 @@ package model -import "github.com/superseriousbusiness/gotosocial/internal/timeline" - -// TimelineResponse wraps a slice of timelineables, ready to be serialized, along with the Link -// header for the previous and next queries, to be returned to the client. -type TimelineResponse struct { - Items []timeline.Timelineable +// PageableResponse wraps a slice of items, ready to be serialized, along with the Link +// header for the previous and next queries / pages, to be returned to the client. +type PageableResponse struct { + Items []interface{} LinkHeader string NextLink string PrevLink string |