mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 16:42:25 -05:00
[chore] Make paging logic more generic (#901)
* make paging logic more generic not just for timelines! * linty linterson
This commit is contained in:
parent
80663061d8
commit
832befd727
9 changed files with 257 additions and 200 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue