diff options
Diffstat (limited to 'internal/api/client/timeline/public.go')
-rw-r--r-- | internal/api/client/timeline/public.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/api/client/timeline/public.go b/internal/api/client/timeline/public.go index f4b233064..6898d781b 100644 --- a/internal/api/client/timeline/public.go +++ b/internal/api/client/timeline/public.go @@ -81,12 +81,15 @@ func (m *Module) PublicTimelineGETHandler(c *gin.Context) { local = i } - statuses, errWithCode := m.processor.PublicTimelineGet(authed, maxID, sinceID, minID, limit, local) + resp, errWithCode := m.processor.PublicTimelineGet(authed, maxID, sinceID, minID, limit, local) if errWithCode != nil { - l.Debugf("error from processor account statuses get: %s", errWithCode) + l.Debugf("error from processor PublicTimelineGet: %s", errWithCode) c.JSON(errWithCode.Code(), gin.H{"error": errWithCode.Safe()}) return } - c.JSON(http.StatusOK, statuses) + if resp.LinkHeader != "" { + c.Header("Link", resp.LinkHeader) + } + c.JSON(http.StatusOK, resp.Statuses) } |